Return the pre-authorization login page url.

@param string            $callbackUrl
@param string|array|null $optional

@return string
769895
public function getPreAuthorizationUrl(string $callbackUrl, $optional = []): string
    {
        // 兼容旧版 API 设计
        if (\is_string($optional)) {
            $optional = [
                'pre_auth_code' => $optional,
            ];
        } else {
            $optional['pre_auth_code'] = $this->createPreAuthorizationCode()['pre_auth_code'];
        }

        $queries = \array_merge($optional, [
            'component_appid' => $this['config']['app_id'],
            'redirect_uri' => $callbackUrl,
        ]);

        return 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?'.http_build_query($queries);
    }
44855
public function getAuthorizationHeader($callbackUrl, $httpMethod = self::HTTP_GET)
    {
        $algorithm = 'HMAC-SHA1';
        if (false === ($signature = Base64::decode($this->secret))) {
            $this->addError(400, 'Invalid Consumer Secret');

            return false;
        }

        if (false === ($signature = Json::decode($signature))) {
            $this->addError(400, 'Invalid Consumer Secret');

            return false;
        }

        $algorithm = $signature->algorithm;

        $oauth = new \OAuth($this->key, $this->secret, $algorithm, OAUTH_AUTH_TYPE_AUTHORIZATION);

        $parameters = [
            'oauth_nonce'            => Generators\Nonce::generate($algorithm),
            'oauth_callback'         => $callbackUrl,
            'oauth_signature_method' => $algorithm,
            'oauth_timestamp'        => time(),
            'oauth_consumer_key'     => $this->key,
        ];

        $parameters[ 'oauth_signature' ] = $oauth->generateSignature($httpMethod, $callbackUrl, $parameters);
        $parameters[ 'oauth_version' ] = $this->version;

        $parts = [];
        foreach ($parameters as $key => $value) {
            $parts[] = $key . '="' . $value . '"';
        }

        return 'OAuth ' . implode(', ', $parts);
    }
853878
public function getOAuth2Url($redirectUrl, $state) {
        return sprintf(self::OAUTH2_LOGIN_CODE_URL, $this->appId, urlencode($redirectUrl), $state);
    }
172010
function getCallback()
	{
		if (!$this->callbackUrl)
			$this->callbackUrl = $this->config->get('gateway.pasargad.callback-url');

		return $this->callbackUrl;
	}
1245832
public function getAuthoriseUrl()
    {
        $clientId = $this->_scopeConfig->getValue(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CLIENT_ID
        );

        //callback uri if not set custom
        $redirectUri = $this->helper->getRedirectUri();
        $redirectUri .= 'connector/email/callback';

        $adminUser = $this->auth->getUser();

        //query params
        $params = [
            'redirect_uri' => $redirectUri,
            'scope' => 'Account',
            'state' => $adminUser->getId(),
            'response_type' => 'code',
        ];

        $authorizeBaseUrl = $this->configHelper
            ->getAuthorizeLink();
        $url = $authorizeBaseUrl . http_build_query($params)
            . '&client_id=' . $clientId;

        return $url;
    }
363772
def get_redirect_url(self, request, callback, parameters=None):
        """"""
        args = self.get_redirect_args(request, callback=callback)
        additional = parameters or {}
        args.update(additional)
        params = urlencode(args)
        return '{0}?{1}'.format(self.authorization_url, params)
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);
    }
567602
public function getAuthorizeUrl($request_token, $callback_uri = NULL, $state = NULL) {
    $request_token = array(
      'oauth_token' => is_array($request_token) ? $request_token['oauth_token'] : $request_token,
    );
    // authorize
    $url = Url::factory($this->getConfig('base_url'));
    $url->addPath($this->getConfig('authorize_path'));
    $url->setQuery($request_token);
    return (string)$url;
  }
217912
public RequestToken retrieveRequestToken(String callbackURL) {
        OAuthConsumer consumer = new DefaultOAuthConsumer(info.key.key, info.key.secret);
        try {
            provider.retrieveRequestToken(consumer, callbackURL);
            return new RequestToken(consumer.getToken(), consumer.getTokenSecret());
        } catch (OAuthException ex) {
            throw new RuntimeException(ex);
        }
    }
690979
public function getAuthorizationUrl($redirect_uri, $response_type = 'code')
    {
        return sprintf('https://%s/auth/o/login/?%s',
            str_replace('api.', '', parse_url($this->adapter->getEndpoint(), PHP_URL_HOST)),
            http_build_query([
                'response_type' => $response_type,
                'client_id' => $this->adapter->getClient(),
                'redirect_uri' => $redirect_uri,
            ])
        );
    }
1071020
public function getAccessTokenFromRedirect($callback_url = '')
    {
        $callback_url = $this->getCallbackUrl($callback_url);

        return $this->getRedirectLoginHelper()->getAccessToken($callback_url);
    }
570332
def get_authorize_url(self, callback_url, state=None):
        
        auth_service = OAuth2Service(
            name='quickbooks',
            client_id=self.client_id,
            client_secret=self.client_secret,
            authorize_url=self.authorize_url,
            access_token_url=self.access_token_url,
            base_url=self.base_url,
        )

        params = {
            'client_id': self.client_id,
            'response_type': 'code',
            'scope': 'com.intuit.quickbooks.accounting',
            'redirect_uri': callback_url,
            'state': state,
        }

        url = auth_service.get_authorize_url(**params)

        return url
1344838
public function getLoginUrl()
	{
		$loginUrl = $this->helper->getLoginUrl($this->callBackUrl, $this->scope);
		return $loginUrl;
	}
156498
public function authenticationStart($redirectUrl)
    {
        $url = $this->config->getEndpoint();
        $url .= '/oauth2/authorize';
        $url .= '?client_id=' . $this->config->getClientId();
        $url .= '&redirect_uri=' . urlencode($redirectUrl);
        $url .= '&response_type=code';

        return $url;
    }
1259060
private String getLoginURL(JaspiRequest jaspiRequest, HttpServletRequest req) {
        String loginURL = null;
        LoginConfiguration loginConfig = jaspiRequest.getLoginConfig();
        if (loginConfig != null) {
            FormLoginConfiguration formLoginConfig = loginConfig.getFormLoginConfiguration();
            if (formLoginConfig != null) {
                String formLoginPageURL = formLoginConfig.getLoginPage();
                StringBuilder builder = new StringBuilder(req.getRequestURL());
                if (tc.isDebugEnabled())
                    Tr.debug(tc, "getFormURL", new Object[] { "formLoginPageURL=" + formLoginPageURL, " requestURL=" + builder });
                int hostIndex = builder.indexOf("//");
                int contextIndex = builder.indexOf("/", hostIndex + 2);
                builder.replace(contextIndex, builder.length(), normalizeURL(formLoginPageURL, req.getContextPath()));
                loginURL = builder.toString();
            }
        }
        return loginURL;
    }
477454
protected function getLoginUrl(string $redirect_url = '') {
        if (empty($redirect_url)) {
            $redirect_url = $this->getClientUrl();
        }
        return $this->getServerUrl() . self::LOGIN_PATH . '?redirect_url=' . $redirect_url;
    }
343286
public function getFastRegistrationUrl(string $callbackUrl, bool $copyWxVerify = true): string
    {
        $queries = [
            'copy_wx_verify' => $copyWxVerify,
            'component_appid' => $this->component['config']['app_id'],
            'appid' => $this->app['config']['app_id'],
            'redirect_uri' => $callbackUrl,
        ];

        return 'https://mp.weixin.qq.com/cgi-bin/fastregisterauth?'.http_build_query($queries);
    }