Get the authorization server.
173881
protected function getAuthorizationServer()
    {
        if (! $this->authorizationServer) {
            $config = $this->config[$this->grant];

            $options = [
                'url' => $this->authorizationServerUri,
                'clientId' => $config['client_id'],
                'clientSecret' => $config['client_secret'],
            ];

            if (! empty($config['redirect_uri'])) {
                $options['redirectUri'] = $this->getFrameworkBridge()->prepareUrl($config['redirect_uri']);
            }

            // Allow setting a custom handler (for mocking requests in tests).
            if (! empty($this->config['handler'])) {
                $options['handler'] = $this->config['handler'];
            }

            $this->authorizationServer = new NorthstarOAuthProvider($options);
        }

        return $this->authorizationServer;
    }
916724
def get_auth(self):
        
        if self.dynamic:
            return self.dynamic
        if self.settings_dict['USER'] == 'dynamic auth':
            return {'instance_url': self.settings_dict['HOST']}
        # If another thread is running inside this method, wait for it to
        # finish. Always release the lock no matter what happens in the block
        db_alias = self.db_alias
        with oauth_lock:
            if db_alias not in oauth_data:
                oauth_data[db_alias] = self.authenticate()
            return oauth_data[db_alias]
906561
def token(self):
        '''
        '''
        auth_header = self.headers.get('Authorization', '')
        if 'Token ' in auth_header:
            return auth_header.partition('Token ')[-1]
        else:
            return auth_header
88678
private AuthorizationService getAuthorizationService(String id) {
        AuthorizationService service = authorization.getService(id);
        if (service == null) {
            throwIllegalArgumentExceptionInvalidAttributeValue(SecurityConfiguration.CFG_KEY_AUTHORIZATION_REF, id);
        }
        return service;
    }
567311
public static function getAuthorizationHeader()
    {
        $headers = null;
        if (isset($_SERVER['Authorization'])) {
            $headers = trim($_SERVER["Authorization"]);
        } else if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
            $headers = trim($_SERVER["HTTP_AUTHORIZATION"]);
        } elseif (function_exists('apache_request_headers')) {
            $requestHeaders = apache_request_headers();
            $requestHeaders = array_combine(array_map(
                'ucwords',
                array_keys($requestHeaders)),
                array_values($requestHeaders)
            );
            if (isset($requestHeaders['Authorization'])) {
                $headers = trim($requestHeaders['Authorization']);
            }
        }
        return $headers;
    }
828696
def get_authorization_url(self,
                              signin_with_twitter=False,
                              access_type=None):
        """"""
        try:
            if signin_with_twitter:
                url = self._get_oauth_url('authenticate')
                if access_type:
                    logging.warning(WARNING_MESSAGE)
            else:
                url = self._get_oauth_url('authorize')
            self.request_token = self._get_request_token(access_type=access_type)
            return self.oauth.authorization_url(url)
        except Exception as e:
            raise TweepError(e)
1246022
final public function getAuthority()
    {

        $self = $this;
        $auth = $self->get("handler", "auth");

        //$authority = \Platform\Authorize::getInstance();

        if (is_a($auth, Authenticate::class)) {
            if (isset($auth->authenticated)) {
                //Read Rights if we have a userId
                //$self->authority = $authority->getPermissions($auth);
            }
        }

        //return $self->authority;
    }
1077839
public function getAuthorizationEndpoint()
    {
        // Parse the endpoint.
        $parsedEndpoint = collect(parse_url($this->endpoint));

        // Return auth url.
        return $parsedEndpoint->get('scheme').'://'.$parsedEndpoint->get('host').'/authorization/api/';
    }
971019
def Credentials(self):
		

		return(clc.v2.API.Call('GET','servers/%s/%s/credentials' % (self.alias,self.name),session=self.session))
122701
public function checkAuthorization($authorization, $client_id, $access_token) {
        $instance = new checkAuthorization($this, $this->getUserAgent(), $authorization, $client_id, $access_token);
        return $instance;
    }
1175250
private function setAuthority(): ?string
    {
        $authority = null;
        if (null !== $this->user_info) {
            $authority = $this->user_info.'@';
        }

        if (null !== $this->host) {
            $authority .= $this->host;
        }

        if (null !== $this->port) {
            $authority .= ':'.$this->port;
        }

        return $authority;
    }
1252455
def getauthority(self, default=None, encoding='utf-8', errors='strict'):
        
        # TBD: (userinfo, host, port) kwargs, default string?
        if default is None:
            default = (None, None, None)
        elif not isinstance(default, collections.Iterable):
            raise TypeError('Invalid default type')
        elif len(default) != 3:
            raise ValueError('Invalid default length')
        # TODO: this could be much more efficient by using a dedicated regex
        return (
            self.getuserinfo(default[0], encoding, errors),
            self.gethost(default[1], errors),
            self.getport(default[2])
        )
979523
protected function authorization()
    {
        $this->gate();

        Telescope::auth(function ($request) {
            return app()->environment('local') ||
                   Gate::check('viewTelescope', [$request->user()]);
        });
    }
1137226
public final function getAuthority(): string
   {
       return ($this->user ? $this->user . static::USER_SEPARATOR : "")
            . $this->host
            . ($this->port ? static::HOST_SEPARATOR . $this->port : "");
   }
643066
def authentication(self):
        '''
        
        '''
        url = '%s/authentication' % (self.domain)
        res = self.session.get(url)
        self._check_response(res)
        return res.json()
239332
public com.google.protobuf.ByteString
      getAuthorizationUrlBytes() {
    java.lang.Object ref = authorizationUrl_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      authorizationUrl_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
918124
public function getAuthority()
    {
        $userInfo = $this->getUserInfo();

        return rtrim(($userInfo ? $userInfo . '@' : '')
            . $this->host
            . (!$this->isStandardPort($this->scheme, $this->port) ? ':' . $this->port : ''),
            ':');
    }