summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749/parameters.py
diff options
context:
space:
mode:
Diffstat (limited to 'oauthlib/oauth2/rfc6749/parameters.py')
-rw-r--r--oauthlib/oauth2/rfc6749/parameters.py30
1 files changed, 19 insertions, 11 deletions
diff --git a/oauthlib/oauth2/rfc6749/parameters.py b/oauthlib/oauth2/rfc6749/parameters.py
index c5127e7..74a15f9 100644
--- a/oauthlib/oauth2/rfc6749/parameters.py
+++ b/oauthlib/oauth2/rfc6749/parameters.py
@@ -37,14 +37,14 @@ def prepare_grant_uri(uri, client_id, response_type, redirect_uri=None,
using the ``application/x-www-form-urlencoded`` format as defined by
[`W3C.REC-html401-19991224`_]:
+ :param uri:
+ :param client_id: The client identifier as described in `Section 2.2`_.
:param response_type: To indicate which OAuth 2 grant/flow is required,
"code" and "token".
- :param client_id: The client identifier as described in `Section 2.2`_.
:param redirect_uri: The client provided URI to redirect back to after
authorization as described in `Section 3.1.2`_.
:param scope: The scope of the access request as described by
`Section 3.3`_.
-
:param state: An opaque value used by the client to maintain
state between the request and callback. The authorization
server includes this value when redirecting the user-agent
@@ -95,7 +95,7 @@ def prepare_token_request(grant_type, body='', **kwargs):
format in the HTTP request entity-body:
:param grant_type: To indicate grant type being used, i.e. "password",
- "authorization_code" or "client_credentials".
+ "authorization_code" or "client_credentials".
:param body: Existing request body to embed parameters in.
:param code: If using authorization code grant, pass the previously
obtained authorization code as the ``code`` argument.
@@ -133,15 +133,19 @@ def prepare_token_revocation_request(url, token, token_type_hint="access_token",
using the "application/x-www-form-urlencoded" format in the HTTP request
entity-body:
- token REQUIRED. The token that the client wants to get revoked.
+ :param token: REQUIRED. The token that the client wants to get revoked.
- token_type_hint OPTIONAL. A hint about the type of the token submitted
- for revocation. Clients MAY pass this parameter in order to help the
- authorization server to optimize the token lookup. If the server is unable
- to locate the token using the given hint, it MUST extend its search across
- all of its supported token types. An authorization server MAY ignore this
- parameter, particularly if it is able to detect the token type
- automatically. This specification defines two such values:
+ :param token_type_hint: OPTIONAL. A hint about the type of the token
+ submitted for revocation. Clients MAY pass this
+ parameter in order to help the authorization server
+ to optimize the token lookup. If the server is
+ unable to locate the token using the given hint, it
+ MUST extend its search across all of its supported
+ token types. An authorization server MAY ignore
+ this parameter, particularly if it is able to detect
+ the token type automatically.
+
+ This specification defines two values for `token_type_hint`:
* access_token: An access token as defined in [RFC6749],
`Section 1.4`_
@@ -264,6 +268,10 @@ def parse_implicit_response(uri, state=None, scope=None):
authorization request. The exact value received from the
client.
+ :param uri:
+ :param state:
+ :param scope:
+
Similar to the authorization code response, but with a full token provided
in the URL fragment: