Provides the OAuth 2.0 client credentials grant logic for authorization servers to issue access tokens to confidential clients.
# 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.
import logging
from ..errors import UnauthorizedClientError
from ..responses import JsonResponse
from .base import BaseGrant
from .base import TokenEndpointMixin
log = logging.getLogger(__name__)
class ClientCredentialsGrant(BaseGrant, TokenEndpointMixin):
"""The client can request an access token using only its client
credentials (or other supported means of authentication) when the
client is requesting access to the protected resources under its
control, or those of another resource owner that have been previously
arranged with the authorization server.
The client credentials grant type MUST only
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key