관리-도구
편집 파일: pre_configured.cpython-39.pyc
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 @ 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| 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 �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 � 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� r) �T/usr/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyr! s<