
    Xi-              	          S r SSKJrJrJrJrJr  SSKJr  SSK	J
r
  SSKJr  SSKJr  SSKJr  SS	KJr  S
SKJr   " S S\
\\\\5      r " S S\
\\\\5      r " S S\
\\\5      r " S S\\\\5      r " S S\\\\5      rg)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                   (    \ rS rSrSr   SS jrSrg)Server   zS
An all-in-one endpoint featuring all four major grant types
and extension grants.
Nc           
         [        U5      U l        [        U5      U l        [	        U5      U l        [        U5      U l        [        U5      U l	        [        U40 UD6U l        [        XX$5      U l        [        R                  " U SU R                  U R                  U R                  S.U R                  S9  [         R                  " U SU R                  U R
                  U R                  U R                  U R                  S.U R                  S9  ["        R                  " U SSU R                  0S9  [$        R                  " X5        [&        R                  " X5        g	)
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          [/app/.venv/lib/python3.13/site-packages/oauthlib/oauth2/rfc6749/endpoints/pre_configured.pyr.   Server.__init__!   s6   , 11BC+,=>CDUV!78I!J./@A!01B!Mf!M!0@
 	&&"(,,
  ${{		
 	3&*oo //&*&<&<!%!3!3@D@V@V  ${{	
 	!!x6M	
 	##D<##D<    )r'   r-   r*   r,   r(   r)   r+   NNN__name__
__module____qualname____firstlineno____doc__r.   __static_attributes__ r8   r6   r   r      s      $<=r8   r   c                   (    \ rS rSrSr   SS jrSrg)WebApplicationServer`   zLAn all-in-one endpoint featuring Authorization code grant and Bearer tokens.Nc                    [        U5      U l        [        U5      U l        [	        XX45      U l        [        R                  " U SSU R                  0U R
                  S9  [        R                  " U SU R                  U R                  S.U R
                  S9  [        R                  " U SSU R
                  0S9  [        R                  " X5        [        R                  " X5        g)	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/   r0   r2   r1   r3   r5   s         r6   r.   WebApplicationServer.__init__e   s    * 11BC./@A!0@
 	&&"("DOO4#{{		
 	3&*oo!%!3!3  ${{	
 	!!x6M	
 	##D<##D<r8   )r'   r-   r+   r9   r:   rA   r8   r6   rC   rC   `   s     W
  $-=r8   rC   c                   (    \ rS rSrSr   SS jrSrg)MobileApplicationServer   zGAn all-in-one endpoint featuring Implicit code grant and Bearer tokens.Nc                 <   [        U5      U l        [        XX45      U l        [        R
                  " U SSU R                  0U R                  S9  [        R
                  " U SSU R                  0S9  [        R
                  " XS/S9  [        R
                  " XS/S9  g)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   rF   s         r6   r.    MobileApplicationServer.__init__   s    * ,,=>!0@
 	&&")#T%8%89#{{		
 	!!x6M	
 	##N;K	
 	##N;K	
r8   )r-   r(   r9   r:   rA   r8   r6   rI   rI      s     R
  $'
r8   rI   c                   (    \ rS rSrSr   SS jrSrg)LegacyApplicationServer   z]An all-in-one endpoint featuring Resource Owner Password Credentials grant and Bearer tokens.Nc                 r   [        U5      U l        [        U5      U l        [	        XX45      U l        [        R                  " U SU R                  U R                  S.U R
                  S9  [        R                  " U SSU R
                  0S9  [        R                  " X5        [        R                  " X5        g)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   rF   s         r6   r.    LegacyApplicationServer.__init__   s    * DDUV./@A!0@
 	) //!%!3!3  ${{	
 	!!x6M	
 	##D<##D<r8   )r-   r)   r+   r9   r:   rA   r8   r6   rQ   rQ      s     h
  $'=r8   rQ   c                   (    \ rS rSrSr   SS jrSrg)BackendApplicationServer   zLAn all-in-one endpoint featuring Client Credentials grant and Bearer tokens.Nc                 <   [        U5      U l        [        XX45      U l        [        R
                  " U SSU R                  0U R                  S9  [        R
                  " U SSU R                  0S9  [        R
                  " XS/S9  [        R
                  " XS/S9  g)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$   rL   rM   N)	r   r*   r   r-   r   r.   r   r   r   rF   s         r6   r.   !BackendApplicationServer.__init__   s    * "88I!J!0@
 	3-t/E/EF#{{		
 	!!x6M	
 	##N;K	
 	##N;K	
r8   )r-   r*   r9   r:   rA   r8   r6   rV   rV      s     W
  $'
r8   rV   N)r?   r"   r   r   r   r   r   tokensr   authorizationr
   
introspectr   resourcer   
revocationr   r   r   #oauthlib.oauth2.rfc8628.grant_typesr   r   rC   rI   rQ   rV   rA   r8   r6   <module>r`      s     ! 0 * & *   ?D=-}>NPbD=N2=-}>NPb2=j,
-/?AS,
^,=%'79K,=^,
%'79K,
r8   