File manager - Edit - /snap/core20/2866/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/__pycache__/pre_configured.cpython-38.pyc
Back
U ��I]�. � @ s� d Z ddlmZmZ ddlmZmZmZmZm Z ddl mZ ddlm Z ddlmZ dd lmZ dd lmZ ddlmZ G dd � d e eeee�ZG dd� de 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. � )�absolute_import�unicode_literals� )�AuthorizationCodeGrant�ClientCredentialsGrant� ImplicitGrant�RefreshTokenGrant�%ResourceOwnerPasswordCredentialsGrant)�BearerToken� )�AuthorizationEndpoint)�IntrospectEndpoint)�ResourceEndpoint)�RevocationEndpoint)� TokenEndpointc @ s e Zd ZdZddd�ZdS )�Serverz<An all-in-one endpoint featuring all four major grant types.Nc O s� t |�}t|�}t|�} t|�} t|�}t||||�}tj| d|||d�|d� tj| d|| | |d�|d� t j| dd|id� 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 �tokenZnone�Zdefault_response_typeZresponse_types�default_token_type�authorization_code)r �password�client_credentials� refresh_token�Zdefault_grant_type�grant_typesr �Bearer�Z default_tokenZtoken_typesN)r r r r r r r �__init__r r r r ) �self�request_validator�token_expires_in�token_generator�refresh_token_generator�args�kwargs� auth_grant�implicit_grant�password_grant�credentials_grant� refresh_grant�bearer� r, �R/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyr s>