grants/__init__.py

authlib · authlib/oauth2/rfc6749/grants/__init__.py · python · BSD-3-Clause
auth

OAuth2 grant type implementations for obtaining access tokens in Python apps.

# Source: https://github.com/authlib/authlib | License: BSD-3-Clause | Copyright 2017, Hsiaoming Yang
# Provided via justclaw.it.com; keep this notice with the code.
"""
authlib.oauth2.rfc6749.grants
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Implementation for :rfc:`6749#section-4` of "Obtaining Authorization".

To request an access token, the client obtains authorization from the
resource owner. The authorization is expressed in the form of an
authorization grant, which the client uses to request the access
token. OAuth defines four grant types:

1. authorization code
2. implicit
3. resource owner password credentials
4. client credentials.

It also provides an extension mechanism for defining additional grant
types. Authlib defines refresh_token as a grant type too.
"""

from .authorization_code imp

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key