Ë
    ?ª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y)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y)ÚServerz<An all-in-one endpoint featuring all four major grant types.Nc           	      ó”  — 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                  | |«       y	)
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          úe/var/www/openai/venv/lib/python3.12/site-packages/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyr*   zServer.__init__   s%  € ô  1Ð1BÓCˆŒÜ+Ð,=Ó>ˆÔÜCØóˆÔä!7Ð8IÓ!JˆÔÜ.Ð/@ÓAˆÔä!Ð"3°_Ø-Ð/FóHˆŒô 	×&Ñ& tÀ6à37·?±?Ø48×4GÑ4GØ37·?±?ñ7)ð
 ;?¿+¹+õ	Gô 	×Ñ˜tÐ8Là9=¿¹Ø/3×/BÑ/BØ9=×9OÑ9OØ48×4FÑ4Fñ	,!ð 37·+±+õ	?ô 	×!Ñ! $°hØ/7¸¿¹Ð.Eõ	Gä×#Ñ# DÐ*;Ô<Ü×#Ñ# DÐ*;Õ<ó    ©NNN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r*   © r3   r2   r   r      s   „ ñ Gà;?Ø?Cô-=r3   r   c                   ó   — e Zd ZdZ	 	 dd„Zy)Ú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                  | |«       y)	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ˆŒÜ.Ð/@ÓAˆÔÜ!Ð"3°_Ø-Ð/FóHˆŒä×&Ñ& tÀ6Ø7=¸t¿¹Ð6OØ:>¿+¹+õ	Gô 	×Ñ˜tÐ8Là9=¿¹Ø48×4FÑ4Fñ,!ð 37·+±+õ	?ô 	×!Ñ! $°hØ/7¸¿¹Ð.Eõ	Gä×#Ñ# DÐ*;Ô<Ü×#Ñ# DÐ*;Õ<r3   r4   r5   r:   r3   r2   r<   r<   I   s   „ ñ Wà:>Ø@Dô=r3   r<   c                   ó   — e Zd ZdZ	 	 dd„Zy)ÚMobileApplicationServerzGAn all-in-one endpoint featuring Implicit code grant and Bearer tokens.Nc                 óT  — t        |«      | _        t        ||||«      | _        t	        j
                  | dd| j                  i| j                  ¬«       t        j
                  | dd| j                  i¬«       t        j
                  | |dg¬«       t        j
                  | |dg¬«       y)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ˆŒä×&Ñ& tÀ7à+2°D×4GÑ4Gð7Ià:>¿+¹+õ	Gô 	×!Ñ! $°hØ/7¸¿¹Ð.Eõ	Gä×#Ñ# DÐ*;Ø;IÐ:Jõ	Lä×#Ñ# DÐ*;Ø;IÐ:Jö	Lr3   r4   r5   r:   r3   r2   r@   r@   p   s   „ ñ Rà:>Ø@DôLr3   r@   c                   ó   — e Zd ZdZ	 	 dd„Zy)ÚLegacyApplicationServerz]An all-in-one endpoint featuring Resource Owner Password Credentials grant and Bearer tokens.Nc                 ó~  — t        |«      | _        t        |«      | _        t	        ||||«      | _        t        j                  | d| j                  | j                  dœ| j
                  ¬«       t        j                  | dd| j
                  i¬«       t        j                  | |«       t        j                  | |«       y)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ˆÔÜ!Ð"3°_Ø-Ð/FóHˆŒä×Ñ˜t¸
à/3×/BÑ/BØ48×4FÑ4Fñ,!ð 37·+±+õ	?ô 	×!Ñ! $°hØ/7¸¿¹Ð.Eõ	Gä×#Ñ# DÐ*;Ô<Ü×#Ñ# DÐ*;Õ<r3   r4   r5   r:   r3   r2   rF   rF   “   s   „ ñ hà:>Ø@Dô=r3   rF   c                   ó   — e Zd ZdZ	 	 dd„Zy)ÚBackendApplicationServerzLAn all-in-one endpoint featuring Client Credentials grant and Bearer tokens.Nc                 óT  — t        |«      | _        t        ||||«      | _        t	        j
                  | dd| j                  i| j                  ¬«       t        j
                  | dd| j                  i¬«       t        j
                  | |dg¬«       t        j
                  | |dg¬«       y)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ˆÔÜ!Ð"3°_Ø-Ð/FóHˆŒä×Ñ˜tÐ8Là#7¸×9OÑ9Oð,Qà26·+±+õ	?ô 	×!Ñ! $°hØ/7¸¿¹Ð.Eõ	Gä×#Ñ# DÐ*;Ø;IÐ:Jõ	Lä×#Ñ# DÐ*;Ø;IÐ:Jö	Lr3   r4   r5   r:   r3   r2   rI   rI   ¸   s   „ ñ Wà:>Ø@Dô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Ý *Ý &Ý *Ý  ô2=Ð"Ð$6¸ØÐ1ô2=ôj$=Ð0Ð2DÀmØ+Ð-?ô$=ôN LÐ3Ð5GØ.Ð0Bô LôF"=˜mÐ-?Ø.Ð0Bô"=ôJ L˜}Ð.@Ø/Ð1Cõ Lr3   