Returns the authorization URL that will provide the authorization code"
after manual approval.

@return string
961970
public function getAuthorizationUrl() 
    {
        $result = null;
        if (!$this->config->hasCredentials()) {
            $this->registerApplication();
        }
        //Return the Authorization URL
        return "https://{$this->config->getMastodonInstance()}/oauth/authorize/?".http_build_query(
            [
            "response_type"    => "code",
            // @todo review usage of singular / plural in redirect_uri
            "redirect_uri"     => $this->config->getRedirectUris(),
            "scope"            => $this->config->getScopes(),
            "client_id"        => $this->config->getClientId(),
            ]
        );
    }
74138
protected function getReturnUrl()
    {
        $backUrl = $this->getRequest()->getSession()->get('oauth2.backurl');
        if (!$backUrl || !Director::is_site_url($backUrl)) {
            $backUrl = Director::absoluteBaseURL();
        }

        return $backUrl;
    }
415780
private function getAuthCode()
    {
        $amount = intval($this->parameters['amount']);
        if (!$this->sandbox) {
            $url = $this->endpoint . "/Auth/{$this->parameters['custom']}/{$this->parameters['transactionId']}/{$amount}";
            $url_redirect = $this->endpoint_redirect;
        } else {
            $url = $this->sandbox_endpoint . "/Auth/{$this->options['app_key']}/{$this->parameters['transactionId']}/{$amount}";
            $url_redirect = $this->sandbox_endpoint_redirect;
        }
        $response = $this->xml2array($this->curl_request($url));
        $output = explode('|', $response['0']);
        if ($output['0'] != 1) {
            throw new \Exception($output['1']);
        }

        $this->transactionReference = $output['2'];
        $this->auth_code = $output['3'];
        $this->redirect = $url_redirect . '?AuthCode=' . $this->auth_code;
    }
258675
public function getAuthority()
    {
        $scheme = $this->getScheme();
        $serverName = $this->getHost();
        $serverPort = $this->getPort();

        $authority = sprintf('%s://%s', $scheme, $serverName);
        if (('https' === $scheme && 443 !== $serverPort) || ('http' === $scheme && 80 !== $serverPort)) {
            $authority .= sprintf(':%d', $serverPort);
        }

        return $authority;
    }
125944
public function getAuthorizationCode($code)
    {
        if (!isset($this->authorizationCodes[$code])) {
            return false;
        }

        return array_merge(array(
            'authorization_code' => $code,
        ), $this->authorizationCodes[$code]);
    }
113068
public function getAuthorizeLink($website = 0)
    {
        //base url, check for custom oauth domain
        if ($this->isAuthorizeCustomDomain($website)) {
            $baseUrl = $this->getWebsiteConfig(self::XML_PATH_CONNECTOR_CUSTOM_DOMAIN)
                . self::API_CONNECTOR_OAUTH_URL_AUTHORISE;
        } else {
            $baseUrl = $this->getRegionAuthorize($website) . self::API_CONNECTOR_OAUTH_URL_AUTHORISE;
        }

        return $baseUrl;
    }
612382
public function getFormUrl()
    {
        $this->_initOrder();
        $order = $this->_order;
        $payment = $order->getPayment();
        return $payment->getAdditionalInformation('issuerUrl');
    }
1050195
def get_authorization_url(self):
        
        return self._build_authorization_request_url(
            response_type=auth.TOKEN_RESPONSE_TYPE,
            redirect_url=self.redirect_url,
        )
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/';
    }
900837
public function getRedirectUrl()
    {
        // Build the request
        $id = $this->_generateUniqueID();
        $issueInstant = $this->_getTimestamp();

        $request = <<<AUTHNREQUEST
<samlp:AuthnRequest
    xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
    ID="$id"
    Version="2.0"
    IssueInstant="$issueInstant"
    ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
    AssertionConsumerServiceURL="{$this->_settings->spReturnUrl}">
    <saml:Issuer>{$this->_settings->spIssuer}</saml:Issuer>
    <samlp:NameIDPolicy
        Format="{$this->_settings->requestedNameIdFormat}"
        AllowCreate="true"></samlp:NameIDPolicy>
    <samlp:RequestedAuthnContext Comparison="exact">
        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
    </samlp:RequestedAuthnContext>
</samlp:AuthnRequest>
AUTHNREQUEST;

        // Encode the request
        $deflatedRequest = gzdeflate($request);
        $base64Request = base64_encode($deflatedRequest);
        $encodedRequest = urlencode($base64Request);

        // Build redirect URL
        $url = $this->_settings->idpSingleSignOnUrl . "?SAMLRequest=" . $encodedRequest;

        // Keep the original GET parameters
        foreach ($this->_get_params as $param => $value) {
            $url .= "&" . $param . "=" . urlencode($value);
        }

        return $url;
    }
1043591
public function getAuthorizationCode($code)
    {
        $code = $this->collection('code_table')->findOne(array(
            'authorization_code' => $code
        ));
        return is_null($code) ? false : $code;
    }
673444
public function getAuthenticationUrl()
    {
        $params = [
            'client_id' => $this->clientId,
            'scope' => $this->scopes,
            'state' => $this->state,
            'response_type' => 'code',
            'redirect_uri' => $this->redirectUrl,
        ];

        return 'https://medium.com/m/oauth/authorize?' . http_build_query($params);
    }
230603
public function getAuthorizationUrl($scopes = [])
    {
        $this->provider;
        $authorizationUrl = $this->provider->getAuthorizationUrl([
            'scope' => join(' ', $scopes)
        ]);
        $_SESSION['oauth2_lockme_state'] = $this->provider->getState();
        return $authorizationUrl;
    }
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;
    }
445753
public function getOauthAccessToken()
    {
        $appid = $this->config->get('appid');
        $appsecret = $this->config->get('appsecret');
        $code = isset($_GET['code']) ? $_GET['code'] : '';
        $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={$appid}&secret={$appsecret}&code={$code}&grant_type=authorization_code";
        return $this->httpGetForJson($url);
    }
552288
public function authorizationCodeUrl()
    {
        // Get the Discovery URI
        if (!$this->endpointDiscovery()) return false;

        $url = $this->authorization_endpoint;
        $url .= '?response_type=code';
        $url .= '&client_id=' . $this->mpClientId;
        $url .= '&scope=' . $this->scope . ' openid';
        $url .= '&redirect_uri=' . $this->mpRedirectURL;

        return $url;
    }
182437
def get_authorization_url(self):
        """"""
        url = self._get_oauth_url('authenticate')
        query = {
            'client_id': self._client_id,
            'response_type': 'code',
            'redirect_uri': self.callback
        }
        query_str = self.urlencode(query)

        return url + '?' + query_str