MCPcopy Create free account
hub / github.com/authlib/authlib / create_authorization_url

Method create_authorization_url

authlib/oauth1/client.py:85–102  ·  view source on GitHub ↗

Create an authorization URL by appending request_token and optional kwargs to url. This is the second step in the OAuth 1 workflow. The user should be redirected to this authorization URL, grant access to you, and then be redirected back to you. The redirection back

(self, url, request_token=None, **kwargs)

Source from the content-addressed store, hash-verified

83 self.handle_error("missing_token", message)
84
85 def create_authorization_url(self, url, request_token=None, **kwargs):
86 """Create an authorization URL by appending request_token and optional
87 kwargs to url.
88
89 This is the second step in the OAuth 1 workflow. The user should be
90 redirected to this authorization URL, grant access to you, and then
91 be redirected back to you. The redirection back can either be specified
92 during client registration or by supplying a callback URI per request.
93
94 :param url: The authorization endpoint URL.
95 :param request_token: The previously obtained request token.
96 :param kwargs: Optional parameters to append to the URL.
97 :returns: The authorization URL with new parameters embedded.
98 """
99 kwargs["oauth_token"] = request_token or self.auth.token
100 if self.auth.redirect_uri:
101 kwargs["oauth_callback"] = self.auth.redirect_uri
102 return add_params_to_uri(url, kwargs.items())
103
104 def fetch_request_token(self, url, **kwargs):
105 """Method for fetching an access token from the token endpoint.

Callers

nothing calls this directly

Calls 1

add_params_to_uriFunction · 0.90

Tested by

no test coverage detected