File manager - Edit - /usr/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/endpoints/__pycache__/pre_configured.cpython-36.pyc
Back
3 ,�['0 � @ s� d Z ddlmZmZ ddlmZmZmZmZm Z m Z mZmZ ddl mZ ddlmZ ddlmZ dd lmZ dd lmZ G dd� deeee�ZG d d� deeee�ZG dd� deee�ZG dd� deee�ZG dd� deee�ZdS )z� oauthlib.oauth2.rfc6749 ~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of various logic needed for consuming and providing OAuth 2.0 RFC6749. � )�absolute_import�unicode_literals� )�AuthCodeGrantDispatcher�AuthorizationCodeGrant�ClientCredentialsGrant� ImplicitGrant�OpenIDConnectAuthCode�OpenIDConnectImplicit�RefreshTokenGrant�%ResourceOwnerPasswordCredentialsGrant)�BearerToken� )�AuthorizationEndpoint)�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|�}t|�} t||||�}t||d�}t j | d||| | ||||d�|d� tj | d|| | ||d�|d� tj | dd|id � t j | |� 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. )Zdefault_auth_grantZoidc_auth_grant�code)r �tokenZid_tokenzid_token tokenz code tokenz code id_tokenzcode token id_tokenZnone)�default_response_type�response_types�default_token_type�authorization_code)r �password�client_credentials� refresh_tokenZopenid)�default_grant_type�grant_typesr �Bearer)� default_token�token_typesN)r r r r r r r r r r �__init__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_grantZopenid_connect_authZopenid_connect_implicit�bearerZauth_grant_choice� r0 �$/usr/lib/python3.6/pre_configured.pyr"