Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/oauthlib/oauthlib
/ functions
Functions
1,036 in github.com/oauthlib/oauthlib
⨍
Functions
1,036
◇
Types & classes
212
↳
Endpoints
28
↓ 113 callers
Method
create_token_response
(self)
examples/device_code_flow.py:206
↓ 90 callers
Method
get
(self, k, default=None)
oauthlib/common.py:318
↓ 76 callers
Method
create_authorization_response
:param request: OAuthlib request. :type request: oauthlib.common.Request :param token_handler: A token handler instance, for
oauthlib/oauth2/rfc6749/grant_types/base.py:119
↓ 50 callers
Function
is_absolute_uri
(uri)
oauthlib/uri_validate.py:188
↓ 34 callers
Method
update
(self, *args, **kwargs)
oauthlib/common.py:325
↓ 34 callers
Function
urlencode
(params)
oauthlib/common.py:63
↓ 32 callers
Method
sign
Sign a request Signs an HTTP request with the specified parts. Returns a 3-tuple of the signed request's URI, headers, and body.
oauthlib/oauth1/rfc5849/__init__.py:264
↓ 28 callers
Function
base_string_uri
Calculates the _base string URI_. The *base string URI* is one of the components that make up the *signature base string*. The ``h
oauthlib/oauth1/rfc5849/signature.py:106
↓ 27 callers
Method
_create_request
(self, uri, http_method, body, headers)
oauthlib/oauth1/rfc5849/endpoints/base.py:69
↓ 24 callers
Method
_subclass_must_implement
Returns a NotImplementedError for a function that should be implemented. :param fn: name of the function
oauthlib/oauth1/rfc5849/request_validator.py:197
↓ 21 callers
Method
validate_metadata
(self, array, key, is_required=False, is_list=False, is_url=False, is_issuer=False)
oauthlib/oauth2/rfc6749/endpoints/metadata.py:62
↓ 20 callers
Function
urldecode
Decode a query string in x-www-form-urlencoded format into a sequence of two-element tuples. Unlike urlparse.parse_qsl(..., strict_parsing=Tr
oauthlib/common.py:99
↓ 18 callers
Method
encode
(x)
oauthlib/oauth1/rfc5849/__init__.py:124
↓ 17 callers
Method
__init__
Construct a new all-grants-in-one server. :param request_validator: An implementation of oauthlib.oauth2.Re
oauthlib/oauth2/rfc6749/endpoints/pre_configured.py:33
↓ 15 callers
Method
create_request_token_response
Create a request token response, with a new request token if valid. :param uri: The full URI of the token request. :param http_method
oauthlib/oauth1/rfc5849/endpoints/request_token.py:49
↓ 14 callers
Function
is_secure_transport
Check if the uri is over ssl.
oauthlib/oauth2/rfc6749/utils.py:79
↓ 14 callers
Method
prepare_request_body
Prepare the access token request body. The client makes a request to the token endpoint by adding the following parameters using the
oauthlib/oauth2/rfc6749/clients/web_application.py:104
↓ 13 callers
Method
create_introspect_response
Create introspect valid or invalid response If the authorization server is unable to determine the state of the token without additio
oauthlib/oauth2/rfc6749/endpoints/introspect.py:48
↓ 13 callers
Method
parse_request_body_response
Parse the JSON response body. If the access token request is valid and authorized, the authorization server issues an access token as
oauthlib/oauth2/rfc6749/clients/base.py:377
↓ 11 callers
Function
add_params_to_uri
Add a list of two-tuples to the uri query components.
oauthlib/common.py:242
↓ 11 callers
Method
create_revocation_response
Revoke supplied access or refresh token. The authorization server responds with HTTP status code 200 if the token has been revoked s
oauthlib/oauth2/rfc6749/endpoints/revocation.py:39
↓ 11 callers
Function
extract_params
Extract parameters and return them as a list of 2-tuples. Will successfully extract parameters from urlencoded query strings, dicts, or lists
oauthlib/common.py:132
↓ 11 callers
Method
validate_authorization_request
:param request: OAuthlib request. :type request: oauthlib.common.Request
oauthlib/oauth2/rfc6749/grant_types/implicit.py:252
↓ 10 callers
Method
add_id_token
Construct an initial version of id_token, and let the request_validator sign or encrypt it. The initial version can contain
oauthlib/openid/connect/core/grant_types/base.py:74
↓ 10 callers
Method
add_token
Add token to the request uri, body or authorization header. The access token type provides the client with the information required t
oauthlib/oauth2/rfc6749/clients/base.py:167
↓ 10 callers
Function
get_query_credentials
(uri)
tests/oauth2/rfc6749/endpoints/test_utils.py:4
↓ 10 callers
Function
prepare_token_request
Prepare the access token request. The client makes a request to the token endpoint by adding the following parameters using the ``application
oauthlib/oauth2/rfc6749/parameters.py:93
↓ 9 callers
Method
_check_signature
(self, request, is_token_request=False)
oauthlib/oauth1/rfc5849/endpoints/base.py:178
↓ 9 callers
Method
_handler_for_request
(self, request)
oauthlib/openid/connect/core/grant_types/dispatchers.py:51
↓ 9 callers
Function
collect_parameters
Gather the request parameters from all the parameter sources. This function is used to extract all the parameters, which are then passed
oauthlib/oauth1/rfc5849/signature.py:237
↓ 9 callers
Function
parse_token_response
Parse the JSON token response body into a dict. The authorization server issues an access token and optional refresh token, and constructs th
oauthlib/oauth2/rfc6749/parameters.py:360
↓ 9 callers
Method
validate_request
:param request: OAuthlib request. :type request: oauthlib.common.Request
oauthlib/oauth2/rfc6749/tokens.py:262
↓ 8 callers
Method
create_token
Create a BearerToken, by default without refresh token. :param request: OAuthlib request. :type request: oauthlib.common.Req
oauthlib/oauth2/rfc6749/tokens.py:292
↓ 8 callers
Method
save_token
Persist the token with a token type specific method. Currently, only save_bearer_token is supported. :param token: A (Bearer) token
oauthlib/oauth2/rfc6749/request_validator.py:306
↓ 8 callers
Function
scope_to_list
Convert a space separated string to a list of scopes.
oauthlib/oauth2/rfc6749/utils.py:24
↓ 8 callers
Method
validate_token_request
(self, request)
oauthlib/oauth2/rfc6749/endpoints/token.py:117
↓ 7 callers
Method
authenticate_client
Authenticate client through means outside the OAuth 2 spec. Means of authentication is negotiated beforehand and may for example be `
oauthlib/oauth2/rfc6749/request_validator.py:41
↓ 7 callers
Method
create_access_token_response
Create an access token response, with a new request token if valid. :param uri: The full URI of the token request. :param http_method
oauthlib/oauth1/rfc5849/endpoints/access_token.py:54
↓ 7 callers
Method
create_device_authorization_response
(request)
examples/device_code_flow.py:97
↓ 7 callers
Function
generate_token
Generates a non-guessable OAuth token OAuth (1 and 2) does not specify the format of tokens except that they should be strings of random char
oauthlib/common.py:188
↓ 7 callers
Function
list_to_scope
Convert a list of scopes to a space separated string.
oauthlib/oauth2/rfc6749/utils.py:14
↓ 7 callers
Function
prepare_grant_uri
Prepare the authorization grant request URI. The client constructs the request URI by adding the following parameters to the query component
oauthlib/oauth2/rfc6749/parameters.py:25
↓ 7 callers
Method
prepare_request_body
Add the resource owner password and username to the request body. The client makes a request to the token endpoint by adding the foll
oauthlib/oauth2/rfc6749/clients/legacy_application.py:41
↓ 7 callers
Method
prepare_request_uri
Prepare the authorization code request URI The client constructs the request URI by adding the following parameters to the query comp
oauthlib/oauth2/rfc6749/clients/web_application.py:43
↓ 7 callers
Method
validate_protected_resource_request
Create a request token response, with a new request token if valid. :param uri: The full URI of the token request. :param http_method
oauthlib/oauth1/rfc5849/endpoints/resource.py:53
↓ 6 callers
Method
_configure_endpoint
( self, interval=None, verification_uri_complete=None, user_code_generator=None )
tests/oauth2/rfc8628/test_server.py:11
↓ 6 callers
Method
_get_default_headers
Create default headers for grant responses.
oauthlib/oauth2/rfc6749/grant_types/base.py:217
↓ 6 callers
Function
_sign_hmac
**HMAC-SHA256** The "HMAC-SHA256" signature method uses the HMAC-SHA256 signature algorithm as defined in `RFC4634`_:: digest =
oauthlib/oauth1/rfc5849/signature.py:366
↓ 6 callers
Method
assert_request_raises
Test that the request fails similarly on the validation and response endpoint.
tests/oauth2/rfc8628/endpoints/test_error_responses.py:27
↓ 6 callers
Method
build_request
(self, uri="https://example.com/device_authorize", client_id="foo")
tests/oauth2/rfc8628/endpoints/test_error_responses.py:16
↓ 6 callers
Method
create_token_response
Return token or error in json format. :param request: OAuthlib request. :type request: oauthlib.common.Request :param token_h
oauthlib/oauth2/rfc8628/grant_types/device_code.py:76
↓ 6 callers
Method
create_userinfo_response
Validate BearerToken and return userinfo from RequestValidator The UserInfo Endpoint MUST return a content-type header to indicate wh
oauthlib/openid/connect/core/endpoints/userinfo.py:29
↓ 6 callers
Function
get_fragment_credentials
(uri)
tests/oauth2/rfc6749/endpoints/test_utils.py:9
↓ 6 callers
Method
response_payload
(self)
tests/oauth2/rfc8628/test_server.py:31
↓ 6 callers
Function
sign_plaintext_with_client
(_signature_base_string, client)
oauthlib/oauth1/rfc5849/signature.py:800
↓ 5 callers
Function
add_params_to_qs
Extend a query with a list of two-tuples.
oauthlib/common.py:233
↓ 5 callers
Method
client_authentication_required
Determine if client authentication is required for current request. According to the rfc6749, client authentication is required in the follow
oauthlib/oauth2/rfc6749/request_validator.py:12
↓ 5 callers
Method
create_code_verifier
Create PKCE **code_verifier** used in computing **code_challenge**. See `RFC7636 Section 4.1`_ :param length: REQUIRED. The length of
oauthlib/oauth2/rfc6749/clients/base.py:467
↓ 5 callers
Function
create_request
(body: str = "")
tests/oauth2/rfc8628/grant_types/test_device_code.py:10
↓ 5 callers
Method
prepare_request_uri
Prepare the implicit grant request URI. The client constructs the request URI by adding the following parameters to the query compone
oauthlib/oauth2/rfc6749/clients/mobile_application.py:49
↓ 5 callers
Method
register_response_type
(self, response_type)
oauthlib/oauth2/rfc6749/grant_types/base.py:110
↓ 5 callers
Method
set_scopes
(self, scopes)
tests/oauth2/rfc6749/endpoints/test_scope_handling.py:23
↓ 5 callers
Method
validate_grant_type
:param request: OAuthlib request. :type request: oauthlib.common.Request
oauthlib/oauth2/rfc6749/grant_types/base.py:152
↓ 5 callers
Method
validate_scopes
:param request: OAuthlib request. :type request: oauthlib.common.Request
oauthlib/oauth2/rfc6749/grant_types/base.py:164
↓ 4 callers
Method
_check_mandatory_parameters
(self, request)
oauthlib/oauth1/rfc5849/endpoints/base.py:113
↓ 4 callers
Method
_check_transport_security
(self, request)
oauthlib/oauth1/rfc5849/endpoints/base.py:107
↓ 4 callers
Function
_sign_rsa
Calculate the signature for an RSA-based signature method. The ``alg`` is used to calculate the digest over the signature base string. F
oauthlib/oauth1/rfc5849/signature.py:598
↓ 4 callers
Method
authenticate_client_id
Ensure client_id belong to a non-confidential client. A non-confidential client is one that is not required to authenticate through o
oauthlib/oauth2/rfc6749/request_validator.py:77
↓ 4 callers
Method
encode
(x)
oauthlib/common.py:349
↓ 4 callers
Function
host_from_uri
Extract hostname and port from URI. Will use default port for HTTP and HTTPS if none is present in the URI.
oauthlib/oauth2/rfc6749/utils.py:41
↓ 4 callers
Function
parse_expires
Parse `expires_in`, `expires_at` fields from params Parse following these rules: - `expires_in` must be either integer, float or None. If a f
oauthlib/oauth2/rfc6749/parameters.py:475
↓ 4 callers
Method
parse_request_uri_response
Parse the response URI fragment. If the resource owner grants the access request, the authorization server issues an access token and
oauthlib/oauth2/rfc6749/clients/mobile_application.py:98
↓ 4 callers
Method
populate_token_attributes
Add attributes from a token exchange response to self.
oauthlib/oauth2/rfc6749/clients/base.py:573
↓ 4 callers
Function
prepare_headers
**Prepare the Authorization header.** Per `section 3.5.1`_ of the spec. Protocol parameters can be transmitted using the HTTP "Authorization"
oauthlib/oauth1/rfc5849/parameters.py:19
↓ 4 callers
Method
register_code_modifier
(self, modifier)
oauthlib/oauth2/rfc6749/grant_types/base.py:113
↓ 4 callers
Method
register_token_modifier
(self, modifier)
oauthlib/oauth2/rfc6749/grant_types/base.py:116
↓ 4 callers
Function
signature_base_string
Construct the signature base string. The *signature base string* is the value that is calculated and signed by the client. It is also in
oauthlib/oauth1/rfc5849/signature.py:55
↓ 4 callers
Function
to_unicode
Convert a number of different types of objects to unicode.
oauthlib/common.py:270
↓ 4 callers
Method
validate_client_key
Validates that supplied client key is a registered and valid client. :param client_key: The client/consumer key. :param request: OAut
oauthlib/oauth1/rfc5849/request_validator.py:464
↓ 4 callers
Method
validate_request
(self, request)
oauthlib/openid/connect/core/tokens.py:36
↓ 4 callers
Method
validate_timestamp_and_nonce
Validates that the nonce has not been used before. :param client_key: The client/consumer key. :param timestamp: The ``oauth_timestam
oauthlib/oauth1/rfc5849/request_validator.py:571
↓ 3 callers
Function
_append_params
Append OAuth params to an existing set of parameters. Both params and oauth_params is must be lists of 2-tuples. Per `section 3.5.2`_ and `3
oauthlib/oauth1/rfc5849/parameters.py:88
↓ 3 callers
Method
_raise_on_bad_method
(self, request)
oauthlib/oauth2/rfc6749/endpoints/base.py:75
↓ 3 callers
Method
_raise_on_bad_post_request
Raise if invalid POST request received
oauthlib/oauth2/rfc6749/endpoints/base.py:82
↓ 3 callers
Method
_raise_on_invalid_client
Raise on failed client authentication.
oauthlib/oauth2/rfc6749/endpoints/base.py:58
↓ 3 callers
Function
_verify_hmac
Verify a HMAC-SHA1 signature. Per `section 3.4`_ of the spec. .. _`section 3.4`: https://tools.ietf.org/html/rfc5849#section-3.4 To sat
oauthlib/oauth1/rfc5849/signature.py:431
↓ 3 callers
Function
_verify_rsa
Verify a base64 encoded signature for a RSA-based signature method. The ``alg`` is used to calculate the digest over the signature base stri
oauthlib/oauth1/rfc5849/signature.py:660
↓ 3 callers
Method
check_realms
Check that the realm is one of a set allowed realms.
oauthlib/oauth1/rfc5849/request_validator.py:193
↓ 3 callers
Method
create_token
Create a JWT Token, using requestvalidator method.
oauthlib/openid/connect/core/tokens.py:27
↓ 3 callers
Function
escape
Escape a string in an OAuth-compatible fashion. TODO: verify whether this can in fact be used for OAuth 2
oauthlib/oauth2/rfc6749/utils.py:60
↓ 3 callers
Method
estimate_type
:param request: OAuthlib request. :type request: oauthlib.common.Request
oauthlib/oauth2/rfc6749/tokens.py:269
↓ 3 callers
Function
filter_oauth_params
Removes all non oauth parameters from a dict or a list of params.
oauthlib/oauth1/rfc5849/utils.py:31
↓ 3 callers
Function
generate_client_id
Generates an OAuth client_id OAuth 2 specify the format of client_id in https://tools.ietf.org/html/rfc6749#appendix-A.
oauthlib/common.py:224
↓ 3 callers
Function
generate_nonce
Generate pseudorandom nonce that is unlikely to repeat. Per `section 3.3`_ of the OAuth 1 RFC 5849 spec. Per `section 3.2.1`_ of the MAC Acce
oauthlib/common.py:161
↓ 3 callers
Function
generate_timestamp
Get seconds since epoch (UTC). Per `section 3.3`_ of the OAuth 1 RFC 5849 spec. Per `section 3.2.1`_ of the MAC Access Authentication spec.
oauthlib/common.py:176
↓ 3 callers
Method
get_oauth_params
Get the basic OAuth parameters to be used in generating a signature.
oauthlib/oauth1/rfc5849/__init__.py:192
↓ 3 callers
Function
get_token_from_header
Helper function to extract a token from the request header. :param request: OAuthlib request. :type request: oauthlib.common.Request
oauthlib/oauth2/rfc6749/tokens.py:236
↓ 3 callers
Method
id_token_hash
Its value is the base64url encoding of the left-most half of the hash of the octets of the ASCII representation of the access_token
oauthlib/openid/connect/core/grant_types/base.py:48
↓ 3 callers
Function
normalize_parameters
Calculate the normalized request parameters. The *normalized request parameters* is one of the components that make up the *signature ba
oauthlib/oauth1/rfc5849/signature.py:324
↓ 3 callers
Function
parse_authorization_code_response
Parse authorization grant response URI into a dict. If the resource owner grants the access request, the authorization server issues an autho
oauthlib/oauth2/rfc6749/parameters.py:232
next →
1–100 of 1,036, ranked by callers