Retrieve URL which will be used to send User to LinkedIn
for authentication

@param array $scope Permissions that your application requires

@return string
175086
public function getLoginUrl(
        array $scope = [Scope::READ_BASIC_PROFILE, Scope::READ_EMAIL_ADDRESS]
    ) {
        $params = [
            'response_type' => self::OAUTH2_RESPONSE_TYPE,
            'client_id' => $this->getClientId(),
            'redirect_uri' => $this->getRedirectUrl(),
            'state' => $this->getState(),
            'scope' => implode(' ', $scope),
        ];
        $uri = $this->buildUrl('authorization', $params);
        return $uri;
    }
230603
public function getAuthorizationUrl($scopes = [])
    {
        $this->provider;
        $authorizationUrl = $this->provider->getAuthorizationUrl([
            'scope' => join(' ', $scopes)
        ]);
        $_SESSION['oauth2_lockme_state'] = $this->provider->getState();
        return $authorizationUrl;
    }
821955
public function getLoginUrl(array $scope = [], $callback_url = '')
    {
        $scope = $this->getScope($scope);
        $callback_url = $this->getCallbackUrl($callback_url);

        return $this->getRedirectLoginHelper()->getLoginUrl($callback_url, $scope);
    }
815601
public function getQueryUrl()
    {
        $uri = $this->getBaseUrl();
        $uri .= Zend_Gdata_Gapps::APPS_USER_PATH;
        if ($this->_username !== null) {
            $uri .= '/' . $this->_username;
        }
        $uri .= $this->getQueryString();
        return $uri;
    }
891760
static function retriveTokensByScope($scope, $domain = null) {
        $kind_schema = self::getGoogleAccessTokenKind();
        $str_query = "SELECT * FROM $kind_schema WHERE scopes='$scope'";
        if (!is_null($domain)) {
            $str_query = $str_query . " AND domain='$domain'";
        }
        return self::fetchAll($kind_schema, $str_query);
    }
127451
public function getReRequestUrl(array $scope, $callback_url = '')
    {
        $scope = $this->getScope($scope);
        $callback_url = $this->getCallbackUrl($callback_url);

        return $this->getRedirectLoginHelper()->getReRequestUrl($callback_url, $scope);
    }
639212
public function get(TreeScope $scope){

        $scopeId = $this->getScopeId($scope);

        if(!isset($this->models[$scopeId])){
            $this->models[$scopeId] = $this->makeModel($scope);
        }

        return $this->models[$scopeId];

    }
151927
public function getNamespacesInScope( $scope = XmlNamespaceScope::All )
	{
		$namespaces = $this->namespaces;

		if ( $scope == XmlNamespaceScope::ExcludeXml )
		{
			// Make sure http://www.w3.org/XML/1998/namespace is not included
			if ( ( $prefix = $this->lookupPrefix( "http://www.w3.org/XML/1998/namespace" ) ) )
			{
				unset( $namespaces[ $prefix ] );
			}
		}
		return $namespaces;
	}
1291831
public function getClientCredentialsToken(array $scopes = null):AccessToken{
		$params = [
			'client_id'     => $this->options->key,
			'client_secret' => $this->options->secret,
			'grant_type'    => 'client_credentials',
		];

		if($scopes !== null){
			$params['scope'] = implode($this->scopesDelimiter, $scopes);
		}

		$request = $this->requestFactory
			->createRequest('POST', $this->clientCredentialsTokenURL ?? $this->accessTokenURL)
			->withHeader('Content-Type', 'application/x-www-form-urlencoded')
			->withBody($this->streamFactory->createStream(http_build_query($params, '', '&', PHP_QUERY_RFC1738)))
		;

		foreach($this->authHeaders as $header => $value){
			$request = $request->withAddedHeader($header, $value);
		}

		$token = $this->parseTokenResponse($this->http->sendRequest($request));

		$this->storage->storeAccessToken($this->serviceName, $token);

		return $token;
	}
85233
public function getUserCode($url = 'this7', $scope = 'snsapi_base') {
        #获取授权页面
        $redirect = urlencode(ROOT . '/' . md5('wechat') . "_wechat");
        $state    = urlencode($url);
        #提交URL地址
        $url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$this->appId&redirect_uri=$redirect&response_type=code&scope=$scope&state=$state#wechat_redirect";
        #授权跳转
        redirect($url);
    }
163687
public function getScopeType($scope = 'public')
    {
        switch ($scope) {
            case 'public':
                $type = \ReflectionMethod::IS_PUBLIC;
                break;
            case 'protected':
                $type = \ReflectionMethod::IS_PROTECTED;
                break;
            case 'private':
                $type = \ReflectionMethod::IS_PRIVATE;
                break;
        }

        return $type;
    }
855959
final public static function getRequestURL()
	{
		$url = array_key_exists('REQUEST_SCHEME', $_SERVER)
			? "{$_SERVER['REQUEST_SCHEME']}://"
			: 'http://';
		if (array_key_exists('PHP_AUTH_USER', $_SERVER)) {
			$url .= static::URLEncode($_SERVER['PHP_AUTH_USER']);
			if (array_key_exists('PHP_AUTH_PW', $_SERVER)) {
				$url .= ':' . static::URLEncode($_SERVER['PHP_AUTH_PW']);
			}
			$url .= '@';
		}

		$url .= $_SERVER['HTTP_HOST'];
		$url .= $_SERVER[array_key_exists('REDIRECT_URL', $_SERVER) ? 'REDIRECT_URL' : 'REQUEST_URI'];

		return $url;
	}
1361497
protected function getOAuthTokenHeader($scopes) {
    if ($this->anonymous) {
      return [];
    }

    try {
      $token = AppIdentityService::getAccessToken($scopes);
      return ["Authorization" => sprintf(self::OAUTH_TOKEN_FORMAT,
                                         $token['access_token'])];
    } catch (AppIdentityException $e) {
      return false;
    }
  }
777942
public function url($to = null, $scope = 'snsapi_userinfo', $state = 'STATE')
    {
        $to !== null || $to = Url::current();

        $params = array(
            'appid'           => $this->appId,
            'redirect_uri'    => $to,
            'response_type'   => 'code',
            'scope'           => $scope,
            'state'           => $state,
            'component_appid' => $this->component_appid,
        );

        return self::API_URL . '?' . http_build_query($params) . '#wechat_redirect';
    }
416686
public static function getGlobalScope($scope)
    {
        return array_first(static::$globalScopes[get_called_class()], function($key, $value) use ($scope)
        {
            return $scope instanceof $value;
        });
    }
1020404
public function exportUrl($scope = 1, $args = null)
    {
        $input = array_merge(Input::all(), Exporter::formatExportQuery($scope, $args));

        return $this->resource().'?'.http_build_query($input);
    }
331474
public function url($to = null, $scope = 'snsapi_userinfo', $state = 'STATE')
    {
        $to !== null || $to = Url::current();

        $queryStr = [
            'appid'         => $this->getAppId(),
            'redirect_uri'  => $to,
            'response_type' => 'code',
            'scope'         => $scope,
            'state'         => $state,
        ];

        return self::API_URL . '?' . http_build_query($queryStr) . '#wechat_redirect';
    }