Ë
    §Bvh‘-  ã            	       ó  — 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 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)ÚTokenEndpointé    )ÚDeviceCodeGrantc                   ó   — e Zd ZdZ	 	 	 dd„Zy)ÚServerz_
    An all-in-one endpoint featuring all four major grant types
    and extension grants.
    Nc           
      óÌ  — t        |«      | _        t        |«      | _        t	        |«      | _        t        |«      | _        t        |«      | _	        t        |fi |¤Ž| _        t        ||||«      | _        t        j                  | d| j                  | j                  | j                  dœ| j                  ¬«       t!        j                  | d| j                  | 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_tokenz,urn:ietf:params:oauth:grant-type:device_code©Údefault_grant_typeÚgrant_typesr   ÚBearer©Údefault_tokenÚtoken_typesN)r   Ú
auth_grantr   Úimplicit_grantr   Úpassword_grantr   Úcredentials_grantr   Úrefresh_grantr   Údevice_code_grantr   Úbearerr
   Ú__init__r   r   r   r   )ÚselfÚrequest_validatorÚtoken_expires_inÚtoken_generatorÚrefresh_token_generatorÚargsÚkwargss          úZ/RAG/venv/lib/python3.12/site-packages/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyr-   zServer.__init__!   sA  € ô, 1Ð1BÓCˆŒÜ+Ð,=Ó>ˆÔÜCÐDUÓVˆÔÜ!7Ð8IÓ!JˆÔÜ.Ð/@ÓAˆÔÜ!0Ð1BÑ!MÀfÑ!MˆÔä!Ø˜Ð0@ÐBYó
ˆŒô 	×&Ñ&ØØ"(àŸ™Ø×,Ñ,ØŸ™ñð
  $Ÿ{™{õ		
ô 	×ÑØØ3à&*§o¡oØ ×/Ñ/Ø&*×&<Ñ&<Ø!%×!3Ñ!3Ø@D×@VÑ@Vñð  $Ÿ{™{õ	
ô 	×!Ñ!Ø °xÀÇÁÐ6Mõ	
ô 	×#Ñ# DÐ*;Ô<Ü×#Ñ# DÐ*;Õ<ó    ©NNN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r-   © r6   r5   r   r      s   „ ñð ØØ $ô<=r6   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/   r1   r0   r2   r4   s         r5   r-   zWebApplicationServer.__init__e   s×   € ô* 1Ð1BÓCˆŒÜ.Ð/@ÓAˆÔÜ!Ø˜Ð0@ÐBYó
ˆŒô 	×&Ñ&ØØ"(Ø" D§O¡OÐ4Ø#Ÿ{™{õ		
ô 	×ÑØØ3à&*§o¡oØ!%×!3Ñ!3ñð  $Ÿ{™{õ	
ô 	×!Ñ!Ø °xÀÇÁÐ6Mõ	
ô 	×#Ñ# DÐ*;Ô<Ü×#Ñ# DÐ*;Õ<r6   r7   r8   r=   r6   r5   r?   r?   `   s   „ ñ Wð
 ØØ $ô-=r6   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   rA   s         r5   r-   z MobileApplicationServer.__init__š   sª   € ô* ,Ð,=Ó>ˆÔÜ!Ø˜Ð0@ÐBYó
ˆŒô 	×&Ñ&ØØ")Ø# T×%8Ñ%8Ð9Ø#Ÿ{™{õ		
ô 	×!Ñ!Ø °xÀÇÁÐ6Mõ	
ô 	×#Ñ#ØÐ#¸NÐ;Kõ	
ô 	×#Ñ#ØÐ#¸NÐ;Kö	
r6   r7   r8   r=   r6   r5   rC   rC   •   s   „ ñ Rð
 ØØ $ô'
r6   rC   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   rA   s         r5   r-   z LegacyApplicationServer.__init__É   s²   € ô* DÐDUÓVˆÔÜ.Ð/@ÓAˆÔÜ!Ø˜Ð0@ÐBYó
ˆŒô 	×ÑØØ)à ×/Ñ/Ø!%×!3Ñ!3ñð  $Ÿ{™{õ	
ô 	×!Ñ!Ø °xÀÇÁÐ6Mõ	
ô 	×#Ñ# DÐ*;Ô<Ü×#Ñ# DÐ*;Õ<r6   r7   r8   r=   r6   r5   rI   rI   Ä   s   „ ñ hð
 ØØ $ô'=r6   rI   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#   rE   rF   N)	r   r)   r   r,   r   r-   r   r   r   rA   s         r5   r-   z!BackendApplicationServer.__init__ø   sª   € ô* "8Ð8IÓ!JˆÔÜ!Ø˜Ð0@ÐBYó
ˆŒô 	×ÑØØ3Ø-¨t×/EÑ/EÐFØ#Ÿ{™{õ		
ô 	×!Ñ!Ø °xÀÇÁÐ6Mõ	
ô 	×#Ñ#ØÐ#¸NÐ;Kõ	
ô 	×#Ñ#ØÐ#¸NÐ;Kö	
r6   r7   r8   r=   r6   r5   rL   rL   ó   s   „ ñ Wð
 ØØ $ô'
r6   rL   N)r<   r!   r   r   r   r   r   Útokensr   Úauthorizationr
   Ú
introspectr   Úresourcer   Ú
revocationr   r   r   Ú#oauthlib.oauth2.rfc8628.grant_typesr   r   r?   rC   rI   rL   r=   r6   r5   Ú<module>rT      s£   ðñ÷õ õ !Ý 0Ý *Ý &Ý *Ý  Ý ?ôD=ØÐ-¨}Ð>NÐPbôD=ôN2=ØÐ-¨}Ð>NÐPbô2=ôj,
ØÐ-Ð/?ÐASô,
ô^,=ØÐ%Ð'7Ð9Kô,=ô^,
ØÐ%Ð'7Ð9Kõ,
r6   