Gets the URL to use to authorize this app
978199
def get_authorize_url(self, state=None):
        
        payload = {'client_id': self.client_id,
                   'response_type': 'code',
                   'redirect_uri': self.redirect_uri,
                   'scope': self.scope}

        urlparams = urllib.parse.urlencode(payload)

        return "%s?%s" % (self.OAUTH_AUTHORIZE_URL, urlparams)
964877
def get_redirect(self, authorization_url, extra_params):
        
        request_token = self._get_request_token()
        params = {'oauth_token': request_token['oauth_token'],
                  'oauth_callback': self.request.build_absolute_uri(
                      self.callback_url)}
        params.update(extra_params)
        url = authorization_url + '?' + urlencode(params)
        return HttpResponseRedirect(url)
741474
function() {
                console.log('oauthInterface.authorization.dialog');
                var that = this;

                return this.request({
                        url: this._buildUri(this.uri + '/authorize'),
                        method: corbel.request.method.GET,
                        dataType: 'text',
                        withCredentials: true,
                        query: corbel.utils.toURLEncoded(this.params.data),
                        noRedirect: true,
                        contentType: corbel.Oauth._URL_ENCODED
                    })
                    .then(function(res) {
                        var params = {
                            url: corbel.Services.getLocation(res),
                            withCredentials: true
                        };
                        return that.request(params);
                    });
            }
934079
public String getAuthorizationUrl(OAuth1RequestToken requestToken) {
        final ParameterList parameters = new ParameterList();
        parameters.add(OAuthConstants.TOKEN, requestToken.getToken());
        return parameters.appendTo(getAuthorizationBaseUrl());
    }
417495
public function getAuthorizationURL()
    {
        $url = Config::inst()->get(self::class, 'AuthorizationUrl');
        $params = [
            'client_id' => $this->client_id,
            'redirect_uri' => $this->getRedirectURL(),
            'response_type' => "code",
            'scope' => $this->scopes,
        ];

        return $url . "?" . http_build_query($params);
    }
461073
public String getAuthorizationUrl(OAuth1RequestToken oAuthRequestToken, Permission permission) {

        OAuth10aService service = new ServiceBuilder(apiKey)
                .apiSecret(sharedSecret)
                .build(FlickrApi.instance());
        String authorizationUrl = service.getAuthorizationUrl(oAuthRequestToken);
        return String.format("%s&perms=%s", authorizationUrl, permission.toString());
    }
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
32505
def construct_oauth_url(self):
        
        response = self._requester(requests.head, 
                                   "{0}://{1}/".format(self.protocol, self.client.server),
                                   allow_redirects=False
                                  )
        if response.is_redirect:
            server = response.headers['location']
        else:
            server = response.url

        path = "oauth/authorize?oauth_token={token}".format(
            token=self.store["oauth-request-token"]
        )
        return "{server}{path}".format(
            server=server,
            path=path
        )
1141121
public static String authorizeUrl(Map<String, Object> params, RequestOptions options)
      throws AuthenticationException, InvalidRequestException {
    final String base = Stripe.getConnectBase();

    params.put("client_id", getClientId(params, options));
    if (params.get("response_type") == null) {
      params.put("response_type", "code");
    }
    String query;
    try {
      query = LiveStripeResponseGetter.createQuery(params);
    } catch (UnsupportedEncodingException e) {
      throw new InvalidRequestException("Unable to encode parameters to "
          + ApiResource.CHARSET
          + ". Please contact support@stripe.com for assistance.",
          null, null, null, 0, e);
    }

    String url = base + "/oauth/authorize?" + query;
    return url;
  }
1305212
public function getAuthorizationUrl()
    {
        // Check for required items
        if (!$this->clientId) {
            throw new Exception('Client ID is required');
        }
        if (!$this->scope) {
            throw new Exception('Scope is required');
        }
        if (!$this->redirectUri) {
            throw new Exception('Redirect URI is required');
        }

        // Start building url (enpoint is the same for public and member APIs)
        $url  = 'https://';
        $url .= (!empty($this->environment)) ? $this->environment . '.' : '';
        $url .= self::HOSTNAME . '/' . self::AUTHORIZE;
        $url .= '?client_id='    . $this->clientId;
        $url .= '&scope='        . $this->scope;
        $url .= '&redirect_uri=' . urlencode($this->redirectUri);
        $url .= '&response_type=code';

        // Process non-required fields
        $url .= ($this->showLogin)          ? '&show_login=true'                    : '';
        $url .= (isset($this->state))       ? '&state=' . $this->state              : '';
        $url .= (isset($this->familyNames)) ? '&family_names=' . $this->familyNames : '';
        $url .= (isset($this->givenNames))  ? '&given_names=' . $this->givenNames   : '';
        $url .= (isset($this->email))       ? '&email=' . urlencode($this->email)   : '';

        return $url;
    }
28054
def get_email_confirmation_redirect_url(self, request):
        
        if request.user.is_authenticated:
            if app_settings.EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL:
                return  \
                    app_settings.EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL
            else:
                return self.get_login_redirect_url(request)
        else:
            return app_settings.EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL
756536
def get_redirect_url(self, **kwargs):
        ""
        name = kwargs.get('provider', '')
        try:
            provider = Provider.objects.get(name=name)
        except Provider.DoesNotExist:
            raise Http404('Unknown OAuth provider.')
        else:
            if not provider.enabled():
                raise Http404('Provider %s is not enabled.' % name)
            client = self.get_client(provider)
            callback = self.get_callback_url(provider)
            params = self.get_additional_parameters(provider)
            return client.get_redirect_url(self.request, callback=callback, parameters=params)
393186
def auth_url(self, scope):
        """"""
        params = {
            'response_type': 'code',
            'client_id': self.__client_id,
            'redirect_uri': self.__redirect_uri,
            'scope': scope
        }

        if self.__state is not None:
            params['state'] = self.__state

        return settings.AUTH_ENDPOINT + '/authorize?' + urllib.urlencode(params)
48312
def _get(self, url, **kw):
        '''
        
        '''
        headers = kw.pop('headers', {})
        headers.setdefault('Content-Type', 'application/json')
        headers.setdefault('Accept', 'application/json')
        headers.setdefault('Authorization', self.AUTHORIZATION_HEADER)
        kw['headers'] = headers
        resp = self.session.get(url, **kw)
        self._raise_for_status(resp)
        return resp
1113524
def get_authorization_url(self):
        """"""
        return self._format_url(
            OAUTH2_ROOT + 'authorize',
            query = {
                'response_type': 'code',
                'client_id': self.client.get('client_id', ''),
                'redirect_uri': self.client.get('redirect_uri', '')
            })
633178
def url=(url)
      uri = URI.parse(url)
      @scheme = uri.scheme
      @app_id = uri.path.split('/').last
      @key    = uri.user
      @secret = uri.password
      @host   = uri.host
      @port   = uri.port
    end
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;
    }