§
    &šg².  ã            	       ó  — d Z ddlmZmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ ddlmZ dd	lmZ  G d
„ de
eeee¦  «        Z G d„ de
eeee¦  «        Z G d„ de
eee¦  «        Z G d„ deeee¦  «        Z G d„ deeee¦  «        ZdS )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 Zd ZdZ	 	 dd„ZdS )ÚServerz<An all-in-one endpoint featuring all four major grant types.Nc           	      óX  — t          |¦  «        | _        t          |¦  «        | _        t	          |¦  «        | _        t          |¦  «        | _        t          |¦  «        | _	        t          ||||¦  «        | _        t          j        | d| j        | j        | j        dœ| j        ¬¦  «         t          j        | d| j        | j        | j        | j	        dœ| j        ¬¦  «         t          j        | dd| j        i¬¦  «         t!          j        | |¦  «         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.
        Ú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Úkwargss          úb/var/www/api/venv/lib/python3.11/site-packages/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyr*   zServer.__init__   sd  € õ  1Ð1BÑCÔCˆŒÝ+Ð,=Ñ>Ô>ˆÔÝCØñô ˆÔå!7Ð8IÑ!JÔ!JˆÔÝ.Ð/@ÑAÔAˆÔå!Ð"3°_Ø-Ð/FñHô HˆŒõ 	Ô& tÀ6à37´?Ø48Ô4GØ37´?ð7)ð 7)ð
 ;?¼+ð	Gñ 	Gô 	Gð 	Gõ 	Ô˜tÐ8Là9=¼Ø/3Ô/BØ9=Ô9OØ48Ô4Fð	,!ð ,!ð 37´+ð	?ñ 	?ô 	?ð 	?õ 	Ô! $°hØ/7¸¼Ð.Eð	Gñ 	Gô 	Gð 	GåÔ# DÐ*;Ñ<Ô<Ð<ÝÔ# DÐ*;Ñ<Ô<Ð<Ð<Ð<ó    ©NNN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r*   © r3   r2   r   r      s7   € € € € € ð GÐFà;?Ø?Cð-=ð -=ð -=ð -=ð -=ð -=r3   r   c                   ó   — e Zd ZdZ	 	 dd„ZdS )ÚWebApplicationServerzLAn all-in-one endpoint featuring Authorization code grant and Bearer tokens.Nc                 ó°  — t          |¦  «        | _        t          |¦  «        | _        t	          ||||¦  «        | _        t          j        | dd| j        i| j        ¬¦  «         t          j        | d| j        | j        dœ| j        ¬¦  «         t          j        | dd| j        i¬¦  «         t          j        | |¦  «         t          j        | |¦  «         dS )	aö  Construct a new web application 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.
        r   r   r   )r   r   r   r    r!   N)r   r$   r   r(   r   r)   r
   r*   r   r   r   r   ©r+   r,   r.   r-   r/   r1   s         r2   r*   zWebApplicationServer.__init__N   s  € õ 1Ð1BÑCÔCˆŒÝ.Ð/@ÑAÔAˆÔÝ!Ð"3°_Ø-Ð/FñHô HˆŒåÔ& tÀ6Ø7=¸t¼Ð6OØ:>¼+ð	Gñ 	Gô 	Gð 	Gõ 	Ô˜tÐ8Là9=¼Ø48Ô4Fð,!ð ,!ð 37´+ð	?ñ 	?ô 	?ð 	?õ 	Ô! $°hØ/7¸¼Ð.Eð	Gñ 	Gô 	Gð 	GåÔ# DÐ*;Ñ<Ô<Ð<ÝÔ# DÐ*;Ñ<Ô<Ð<Ð<Ð<r3   r4   r5   r:   r3   r2   r<   r<   I   s7   € € € € € ð WÐVà:>Ø@Dð=ð =ð =ð =ð =ð =r3   r<   c                   ó   — e Zd ZdZ	 	 dd„ZdS )ÚMobileApplicationServerzGAn all-in-one endpoint featuring Implicit code grant and Bearer tokens.Nc                 ó@  — t          |¦  «        | _        t          ||||¦  «        | _        t	          j        | dd| j        i| j        ¬¦  «         t          j        | dd| j        i¬¦  «         t          j        | |dg¬¦  «         t          j        | |dg¬¦  «         dS )aõ  Construct a new implicit grant 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.
        r   r   r    r!   Úaccess_token©Úsupported_token_typesN)	r   r%   r   r)   r
   r*   r   r   r   r>   s         r2   r*   z MobileApplicationServer.__init__u   sô   € õ ,Ð,=Ñ>Ô>ˆÔÝ!Ð"3°_Ø-Ð/FñHô HˆŒåÔ& tÀ7à+2°DÔ4Gð7Ià:>¼+ð	Gñ 	Gô 	Gð 	Gõ 	Ô! $°hØ/7¸¼Ð.Eð	Gñ 	Gô 	Gð 	GåÔ# DÐ*;Ø;IÐ:Jð	Lñ 	Lô 	Lð 	LåÔ# DÐ*;Ø;IÐ:Jð	Lñ 	Lô 	Lð 	Lð 	Lð 	Lr3   r4   r5   r:   r3   r2   r@   r@   p   s=   € € € € € ð RÐQà:>Ø@DðLð Lð Lð Lð Lð Lr3   r@   c                   ó   — e Zd ZdZ	 	 dd„ZdS )ÚLegacyApplicationServerz]An all-in-one endpoint featuring Resource Owner Password Credentials grant and Bearer tokens.Nc                 óh  — t          |¦  «        | _        t          |¦  «        | _        t	          ||||¦  «        | _        t          j        | d| j        | j        dœ| j        ¬¦  «         t          j        | dd| j        i¬¦  «         t          j        | |¦  «         t          j        | |¦  «         dS )a  Construct a resource owner password credentials grant 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.
        r   )r   r   r   r    r!   N)r   r&   r   r(   r   r)   r   r*   r   r   r   r>   s         r2   r*   z LegacyApplicationServer.__init__˜   sà   € õ DØñô ˆÔå.Ð/@ÑAÔAˆÔÝ!Ð"3°_Ø-Ð/FñHô HˆŒåÔ˜t¸
à/3Ô/BØ48Ô4Fð,!ð ,!ð 37´+ð	?ñ 	?ô 	?ð 	?õ 	Ô! $°hØ/7¸¼Ð.Eð	Gñ 	Gô 	Gð 	GåÔ# DÐ*;Ñ<Ô<Ð<ÝÔ# DÐ*;Ñ<Ô<Ð<Ð<Ð<r3   r4   r5   r:   r3   r2   rF   rF   “   s7   € € € € € ð hÐgà:>Ø@Dð=ð =ð =ð =ð =ð =r3   rF   c                   ó   — e Zd ZdZ	 	 dd„ZdS )ÚBackendApplicationServerzLAn all-in-one endpoint featuring Client Credentials grant and Bearer tokens.Nc                 ó@  — t          |¦  «        | _        t          ||||¦  «        | _        t	          j        | dd| j        i| j        ¬¦  «         t          j        | dd| j        i¬¦  «         t          j        | |dg¬¦  «         t          j        | |dg¬¦  «         dS )aû  Construct a client credentials grant 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.
        r   r   r    r!   rB   rC   N)	r   r'   r   r)   r   r*   r   r   r   r>   s         r2   r*   z!BackendApplicationServer.__init__½   sñ   € õ "8Ð8IÑ!JÔ!JˆÔÝ!Ð"3°_Ø-Ð/FñHô HˆŒåÔ˜tÐ8Là#7¸Ô9Oð,Qà26´+ð	?ñ 	?ô 	?ð 	?õ 	Ô! $°hØ/7¸¼Ð.Eð	Gñ 	Gô 	Gð 	GåÔ# DÐ*;Ø;IÐ:Jð	Lñ 	Lô 	Lð 	LåÔ# DÐ*;Ø;IÐ:Jð	Lñ 	Lô 	Lð 	Lð 	Lð 	Lr3   r4   r5   r:   r3   r2   rI   rI   ¸   s=   € € € € € ð WÐVà:>Ø@DðLð Lð Lð Lð Lð Lr3   rI   N)r9   r   r   r   r   r   r   Útokensr   Úauthorizationr
   Ú
introspectr   Úresourcer   Ú
revocationr   r   r   r   r<   r@   rF   rI   r:   r3   r2   ú<module>rP      sé  ððð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð !Ð  Ð  Ð  Ð  Ð  Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø *Ð *Ð *Ð *Ð *Ð *Ø &Ð &Ð &Ð &Ð &Ð &Ø *Ð *Ð *Ð *Ð *Ð *Ø  Ð  Ð  Ð  Ð  Ð  ð2=ð 2=ð 2=ð 2=ð 2=Ð"Ð$6¸ØÐ1ñ2=ô 2=ð 2=ðj$=ð $=ð $=ð $=ð $=Ð0Ð2DÀmØ+Ð-?ñ$=ô $=ð $=ðN Lð  Lð  Lð  Lð  LÐ3Ð5GØ.Ð0Bñ Lô  Lð  LðF"=ð "=ð "=ð "=ð "=˜mÐ-?Ø.Ð0Bñ"=ô "=ð "=ðJ Lð  Lð  Lð  Lð  L˜}Ð.@Ø/Ð1Cñ Lô  Lð  Lð  Lð  Lr3   