§
    òÝþi‘-  ã            	       ó(  — 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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)ÚTokenEndpointé    )ÚDeviceCodeGrantc                   ó    — e Zd ZdZ	 	 	 dd„ZdS )Ú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        | |¦  «         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_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          úq/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyr-   zServer.__init__!   sz  € õ, 1Ð1BÑCÔCˆŒÝ+Ð,=Ñ>Ô>ˆÔÝCÐDUÑVÔVˆÔÝ!7Ð8IÑ!JÔ!JˆÔÝ.Ð/@ÑAÔAˆÔÝ!0Ð1BÐ!MÐ!MÀfÐ!MÐ!MˆÔå!Ø˜Ð0@ÐBYñ
ô 
ˆŒõ 	Ô&ØØ"(àœØÔ,Øœðð ð
  $œ{ð		
ñ 		
ô 		
ð 		
õ 	ÔØØ3à&*¤oØ Ô/Ø&*Ô&<Ø!%Ô!3Ø@DÔ@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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/   r1   r0   r2   r4   s         r5   r-   zWebApplicationServer.__init__e   s
  € õ* 1Ð1BÑCÔCˆŒÝ.Ð/@ÑAÔAˆÔÝ!Ø˜Ð0@ÐBYñ
ô 
ˆŒõ 	Ô&ØØ"(Ø" D¤OÐ4Ø#œ{ð		
ñ 	
ô 	
ð 	
õ 	ÔØØ3à&*¤oØ!%Ô!3ðð ð  $œ{ð	
ñ 	
ô 	
ð 	
õ 	Ô!Ø °xÀÄÐ6Mð	
ñ 	
ô 	
ð 	
õ 	Ô# DÐ*;Ñ<Ô<Ð<ÝÔ# DÐ*;Ñ<Ô<Ð<Ð<Ð<r6   r7   r8   r=   r6   r5   r?   r?   `   s<   € € € € € ð WÐVð
 ØØ $ð-=ð -=ð -=ð -=ð -=ð -=r6   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   rA   s         r5   r-   z MobileApplicationServer.__init__š   så   € õ* ,Ð,=Ñ>Ô>ˆÔÝ!Ø˜Ð0@ÐBYñ
ô 
ˆŒõ 	Ô&ØØ")Ø# TÔ%8Ð9Ø#œ{ð		
ñ 	
ô 	
ð 	
õ 	Ô!Ø °xÀÄÐ6Mð	
ñ 	
ô 	
ð 	
õ 	Ô#ØÐ#¸NÐ;Kð	
ñ 	
ô 	
ð 	
õ 	Ô#ØÐ#¸NÐ;Kð	
ñ 	
ô 	
ð 	
ð 	
ð 	
r6   r7   r8   r=   r6   r5   rC   rC   •   s<   € € € € € ð RÐQð
 ØØ $ð'
ð '
ð '
ð '
ð '
ð '
r6   rC   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   rA   s         r5   r-   z LegacyApplicationServer.__init__É   sÜ   € õ* DÐDUÑVÔVˆÔÝ.Ð/@ÑAÔAˆÔÝ!Ø˜Ð0@ÐBYñ
ô 
ˆŒõ 	ÔØØ)à Ô/Ø!%Ô!3ðð ð  $œ{ð	
ñ 	
ô 	
ð 	
õ 	Ô!Ø °xÀÄÐ6Mð	
ñ 	
ô 	
ð 	
õ 	Ô# DÐ*;Ñ<Ô<Ð<ÝÔ# DÐ*;Ñ<Ô<Ð<Ð<Ð<r6   r7   r8   r=   r6   r5   rI   rI   Ä   s<   € € € € € ð hÐgð
 ØØ $ð'=ð '=ð '=ð '=ð '=ð '=r6   rI   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#   rE   rF   N)	r   r)   r   r,   r   r-   r   r   r   rA   s         r5   r-   z!BackendApplicationServer.__init__ø   så   € õ* "8Ð8IÑ!JÔ!JˆÔÝ!Ø˜Ð0@ÐBYñ
ô 
ˆŒõ 	ÔØØ3Ø-¨tÔ/EÐFØ#œ{ð		
ñ 	
ô 	
ð 	
õ 	Ô!Ø °xÀÄÐ6Mð	
ñ 	
ô 	
ð 	
õ 	Ô#ØÐ#¸NÐ;Kð	
ñ 	
ô 	
ð 	
õ 	Ô#ØÐ#¸NÐ;Kð	
ñ 	
ô 	
ð 	
ð 	
ð 	
r6   r7   r8   r=   r6   r5   rL   rL   ó   s<   € € € € € ð WÐVð
 ØØ $ð'
ð '
ð '
ð '
ð '
ð '
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Ð 0Ð 0Ð 0Ð 0Ð 0Ø *Ð *Ð *Ð *Ð *Ð *Ø &Ð &Ð &Ð &Ð &Ð &Ø *Ð *Ð *Ð *Ð *Ð *Ø  Ð  Ð  Ð  Ð  Ð  Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?ðD=ð D=ð D=ð D=ð D=ØÐ-¨}Ð>NÐPbñD=ô D=ð D=ðN2=ð 2=ð 2=ð 2=ð 2=ØÐ-¨}Ð>NÐPbñ2=ô 2=ð 2=ðj,
ð ,
ð ,
ð ,
ð ,
ØÐ-Ð/?ÐASñ,
ô ,
ð ,
ð^,=ð ,=ð ,=ð ,=ð ,=ØÐ%Ð'7Ð9Kñ,=ô ,=ð ,=ð^,
ð ,
ð ,
ð ,
ð ,
ØÐ%Ð'7Ð9Kñ,
ô ,
ð ,
ð ,
ð ,
r6   