PHP WebShell
Текущая директория: /usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/__pycache__
Просмотр файла: pre_configured.cpython-310.pyc
o
���a�. � @ s� d Z ddlmZmZmZmZmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ ddlmZ dd lmZ G d
d� de
eeee�ZG dd
� d
e
eeee�ZG dd� de
eee�ZG dd� deeee�ZG dd� deeee�ZdS )z�
oauthlib.oauth2.rfc6749.endpoints.pre_configured
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of various endpoints needed
for providing OAuth 2.0 RFC6749 servers.
� )�AuthorizationCodeGrant�ClientCredentialsGrant�
ImplicitGrant�RefreshTokenGrant�%ResourceOwnerPasswordCredentialsGrant)�BearerToken� )�AuthorizationEndpoint)�IntrospectEndpoint)�ResourceEndpoint)�RevocationEndpoint)�
TokenEndpointc @ � e Zd ZdZ ddd�ZdS )�Serverz<An all-in-one endpoint featuring all four major grant types.Nc O s� t |�| _t|�| _t|�| _t|�| _t|�| _ t
||||�| _tj
| d| j| j| jd�| jd� tj
| d| j| j| j| j d�| jd� tj
| dd| jid� t�
| |� t�
| |� d S )
a� Construct a new all-grants-in-one server.
:param request_validator: An implementation of
oauthlib.oauth2.RequestValidator.
:param token_expires_in: An int or a function to generate a token
expiration offset (in seconds) given a
oauthlib.common.Request object.
:param token_generator: A function to generate a token from a request.
:param refresh_token_generator: A function to generate a token from a
request for the refresh token.
:param kwargs: Extra parameters to pass to authorization-,
token-, resource-, and revocation-endpoint constructors.
�code)r �token�none��default_response_type�response_types�default_token_type�authorization_code)r �password�client_credentials�
refresh_token��default_grant_type�grant_typesr �Bearer��
default_token�token_typesN)r �
auth_grantr �implicit_grantr �password_grantr �credentials_grantr �
refresh_grantr �bearerr �__init__r
r r r
)�self�request_validator�token_expires_in�token_generator�refresh_token_generator�args�kwargs� r0 �R/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyr( s<