
    (phz                         S 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\	R                  5      r
 " S	 S
\	R                  5      rg)a  OAuth 2.0 Async Credentials.

This module provides credentials based on OAuth 2.0 access and refresh tokens.
These credentials usually access resources on behalf of a user (resource
owner).

Specifically, this is intended to use access tokens acquired using the
`Authorization Code grant`_ and can refresh those tokens using a
optional `refresh token`_.

Obtaining the initial access and refresh token is outside of the scope of this
module. Consult `rfc6749 section 4.1`_ for complete details on the
Authorization Code grant flow.

.. _Authorization Code grant: https://tools.ietf.org/html/rfc6749#section-1.3.1
.. _refresh token: https://tools.ietf.org/html/rfc6749#section-6
.. _rfc6749 section 4.1: https://tools.ietf.org/html/rfc6749#section-4.1
    )_credentials_async)_helpers)
exceptions)_reauth_async)credentialsc                       \ rS rSrSr\R                  " \R                  5      S 5       r	\R                  " \R                  5      S 5       r
Srg)Credentials)   zCredentials using OAuth 2.0 access and refresh tokens.

The credentials are considered immutable. If you want to modify the
quota project, use :meth:`with_quota_project` or ::

    credentials = credentials.with_quota_project('myproject-123)
c                   #    U R                   b'  U R                  b  U R                  b  U R                  c  [        R
                  " S5      e[        R                  " UU R                  U R                   U R                  U R                  U R                  U R                  U R                  S9I S h  vN u  nnnnnX l        X@l        X0l         UR                  S5      U l        X`l	        U R                  (       ax  SU;   aq  [        U R                  5      n[        US   R!                  5       5      nXx-
  n	U	(       a4  [        R
                  " SR#                  SR%                  U	5      5      5      eg g g  N7f)NzThe credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_uri, client_id, and client_secret.)scopes
rapt_tokenenable_reauth_refreshid_tokenscopezUNot all requested scopes were granted by the authorization server, missing scopes {}.z, )_refresh_token
_token_uri
_client_id_client_secretr   RefreshErrorreauthrefresh_grant_scopes_rapt_token_enable_reauth_refreshtokenexpiryget	_id_token	frozensetsplitformatjoin)
selfrequestaccess_tokenrefresh_tokenr   grant_responser   requested_scopesgranted_scopes scopes_requested_but_not_granteds
             S/var/www/html/venv/lib/python3.13/site-packages/google/oauth2/_credentials_async.pyrefreshCredentials.refresh2   s\     '&&""*));  &&OOOO<<''"&"="=	
 	
	
 "
+'++J7%<<G~5(6&~g'>'D'D'FGN/?/P,/ --??Ev		"BC@  0	 6<#	
s   B/E61E42CE6c                    #    U R                   (       d  U R                  U5      I S h  vN   U R                  U5        g  N7f)N)validr,   apply)r#   r$   methodurlheaderss        r+   before_requestCredentials.before_requestc   s/     zz,,w'''

7 (s   &A?A)r   r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   copy_docstringr   r	   r,   r4   __static_attributes__     r+   r	   r	   )   sR     [445. 6.` [445 6r>   r	   c                       \ rS rSrSrSrg)UserAccessTokenCredentialsj   a  Access token credentials for user account.

Obtain the access token for a given user account or the current active
user account with the ``gcloud auth print-access-token`` command.

Args:
    account (Optional[str]): Account to get the access token for. If not
        specified, the current active account will be used.
    quota_project_id (Optional[str]): The project ID used for quota
        and billing.

r=   N)r6   r7   r8   r9   r:   r<   r=   r>   r+   r@   r@   j   s    r>   r@   N)r:   google.authr   r   r   r   google.oauth2r   r   oauth2_credentialsr	   r@   r=   r>   r+   <module>rE      sB   & :   " 1 ;>$00 >B!3!N!N r>   