§
    8?Äjc  ã                   óŠ   — d Z ddlmZ ddlmZmZ ddlmZ ddlmZ	  G d„ de	j
        ¦  «        Z
 G d„ d	e	j        ¦  «        Zd
S )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                   óŠ   — e Zd ZdZ ej        ej        ¦  «        d„ ¦   «         Z ej        ej        ¦  «        d„ ¦   «         Z	dS )ÚCredentialsa  Credentials 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           
   ƒ   ó‚  K  — | j         �| j        �| j        �| j        €t	          j        d¦  «        ‚t          j        || j        | j         | j        | j        | j        | j	        | j
        ¬¦  «        ƒ d {V —†\  }}}}}|| _        || _        || _         |                     d¦  «        | _        || _	        | j        r€d|v r~t          | j        ¦  «        }t          |d                              ¦   «         ¦  «        }||z
  }	|	r>t	          j        d                     d                     |	¦  «        ¦  «        ¦  «        ‚d S d S d S )NzžThe 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
             úQC:\Projects\Historical\venv\Lib\site-packages\google/oauth2/_credentials_async.pyÚrefreshzCredentials.refresh1   s–  è è € ð ÔÐ'ØŒÐ&ØŒÐ&ØÔ"Ð*åÔ)ð;ñô ð õ Ô&ØØŒOØÔØŒOØÔØ”<ØÔ'Ø"&Ô"=ð	
ñ 	
ô 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ñ	
ØØØØØð "ˆŒ
ØˆŒØ+ˆÔØ'×+Ò+¨JÑ7Ô7ˆŒØ%ˆÔàŒ<ð 
	˜G ~Ð5Ð5Ý(¨¬Ñ6Ô6ÐÝ& ~°gÔ'>×'DÒ'DÑ'FÔ'FÑGÔGˆNØ/?À.Ñ/PÐ,Ø/ð Ý Ô-ð?ß?EºvØŸ	š	Ð"BÑCÔCñ@ô @ñô ð ð
	ð 
	Ð5Ð5ðð ó    c              ƒ   óx   K  — | j         s|                      |¦  «        ƒ d {V —† |                      |¦  «         d S )N)Úvalidr+   Úapply)r"   r#   ÚmethodÚurlÚheaderss        r*   Úbefore_requestzCredentials.before_requestb   sL   è è € àŒzð 	(Ø—,’,˜wÑ'Ô'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ø�
Š
�7ÑÔÐÐÐr,   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úcopy_docstringr   r	   r+   r3   © r,   r*   r	   r	   (   sw   € € € € € ðð ð €XÔ˜[Ô4Ñ5Ô5ð.ð .ñ 6Ô5ð.ð` €XÔ˜[Ô4Ñ5Ô5ðð ñ 6Ô5ðð ð r,   r	   c                   ó   — e Zd ZdZdS )ÚUserAccessTokenCredentialsa»  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.

    N)r4   r5   r6   r7   r9   r,   r*   r;   r;   i   s   € € € € € ðð ð ð r,   r;   N)r7   Úgoogle.authr   r   r   r   Úgoogle.oauth2r   r   Úoauth2_credentialsr	   r;   r9   r,   r*   ú<module>r?      sÆ   ððð ð& :Ð 9Ð 9Ð 9Ð 9Ð 9Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;ð>ð >ð >ð >ð >Ð$Ô0ñ >ô >ð >ðBð ð ð ð Ð!3Ô!Nñ ô ð ð ð r,   