§
    Âih  ã                   óÐ   — d Z ddlZ	 ddlZddlZdZn# e$ r dZY nw xY w	 ddlZn# e$ r dZY nw xY w	 ddlZddl	ZdZ
n# e$ r dZ
Y nw xY wdd„Zdd„Zd„ Zd„ Zd	„ Zd
„ Zd„ Zd„ ZdS )z=Helpers for authentication using oauth2client or google-auth.é    NTFc                 ó|   — t           r't          j                             | ||¬¦  «        \  }}|S t	          d¦  «        ‚)z'Returns credentials loaded from a file.©ÚscopesÚquota_project_idzAclient_options.credentials_file is only supported in google-auth.)ÚHAS_GOOGLE_AUTHÚgoogleÚauthÚload_credentials_from_fileÚEnvironmentError)Úfilenamer   r   ÚcredentialsÚ_s        ú_/var/www/html/jarvis.com/web/backend/venv/lib/python3.11/site-packages/googleapiclient/_auth.pyÚcredentials_from_filer   )   sP   € åð 
Ýœ×?Ò?Ø˜VÐ6Fð @ñ 
ô 
‰ˆ�Qð ÐåØOñ
ô 
ð 	
ó    c                 óô   — t           r&t          j                             | |¬¦  «        \  }}|S t          r6| €|�t          d¦  «        ‚t          j        j         	                    ¦   «         S t          d¦  «        ‚)z(Returns Application Default Credentials.r   Nzwclient_options.scopes and client_options.quota_project_id are not supported in oauth2client.Please install google-auth.zZNo authentication library is available. Please install either google-auth or oauth2client.)
r   r   r	   ÚdefaultÚHAS_OAUTH2CLIENTr   Úoauth2clientÚclientÚGoogleCredentialsÚget_application_default)r   r   r   r   s       r   Údefault_credentialsr   6   s”   € åð 
Ýœ×,Ò,ØÐ,<ð -ñ 
ô 
‰ˆ�Qð ÐÝ	ð 
ØÐÐ!1Ð!=Ý"ð.ñô ð õ Ô"Ô4×LÒLÑNÔNÐNåð+ñ
ô 
ð 	
r   c                 ó  — t           rIt          | t          j        j        j        ¦  «        r%t          j        j                             | |¦  «        S 	 |                      ¦   «         r|                      |¦  «        S | S # t          $ r | cY S w xY w)a…  Scopes the credentials if necessary.

    Args:
        credentials (Union[
            google.auth.credentials.Credentials,
            oauth2client.client.Credentials]): The credentials to scope.
        scopes (Sequence[str]): The list of scopes.

    Returns:
        Union[google.auth.credentials.Credentials,
            oauth2client.client.Credentials]: The scoped credentials.
    )
r   Ú
isinstancer   r	   r   ÚCredentialsÚwith_scopes_if_requiredÚcreate_scoped_requiredÚcreate_scopedÚAttributeError)r   r   s     r   Úwith_scopesr!   K   sš   € õ ð 	�: kµ6´;Ô3JÔ3VÑWÔWð 	ÝŒ{Ô&×>Ò>¸{ÈFÑSÔSÐSð	Ø×1Ò1Ñ3Ô3ð #Ø"×0Ò0°Ñ8Ô8Ð8à"Ð"øÝð 	ð 	ð 	ØÐÐÐð	øøøs   Á(A= Á;A= Á=BÂBc                 ó  — ddl m} t          rXt          | t          j        j        j        ¦  «        r4t          €t          d¦  «        ‚t          j
        |  |¦   «         ¬¦  «        S |                       |¦   «         ¦  «        S )aa  Returns an http client that is authorized with the given credentials.

    Args:
        credentials (Union[
            google.auth.credentials.Credentials,
            oauth2client.client.Credentials]): The credentials to use.

    Returns:
        Union[httplib2.Http, google_auth_httplib2.AuthorizedHttp]: An
            authorized http client.
    r   )Ú
build_httpNz¶Credentials from google.auth specified, but google-api-python-client is unable to use these credentials unless google-auth-httplib2 is installed. Please install google-auth-httplib2.©Úhttp)Úgoogleapiclient.httpr#   r   r   r   r	   r   r   Úgoogle_auth_httplib2Ú
ValueErrorÚAuthorizedHttpÚ	authorize)r   r#   s     r   Úauthorized_httpr+   d   sŒ   € ð 0Ð/Ð/Ð/Ð/Ð/åð 
3�: kµ6´;Ô3JÔ3VÑWÔWð 
3ÝÐ'Ýð(ñô ð õ $Ô2°;ÀZÀZÁ\Ä\ÐRÑRÔRÐRà×$Ò$ Z Z¡\¤\Ñ2Ô2Ð2r   c                 óú   — t          j        ¦   «         }t          rMt          | t          j        j        j        ¦  «        r)t          j	        |¦  «        }|  
                    |¦  «        S |  
                    |¦  «        S ©N)Úhttplib2ÚHttpr   r   r   r	   r   r   r'   ÚRequestÚrefresh)r   Úrefresh_httpÚrequests      r   Úrefresh_credentialsr4      sh   € õ
 ”=‘?”?€LÝð 1�: kµ6´;Ô3JÔ3VÑWÔWð 1Ý&Ô.¨|Ñ<Ô<ˆØ×"Ò" 7Ñ+Ô+Ð+à×"Ò" <Ñ0Ô0Ð0r   c                 óh   — t          | ¦  «        st          | ¦  «         |                      |¦  «        S r-   )Úis_validr4   Úapply)r   Úheaderss     r   Úapply_credentialsr9   Œ   s4   € å�KÑ Ô ð )Ý˜KÑ(Ô(Ð(Ø×Ò˜WÑ%Ô%Ð%r   c                 óˆ   — t           r+t          | t          j        j        j        ¦  «        r| j        S | j        d uo| j         S r-   )	r   r   r   r	   r   r   ÚvalidÚaccess_tokenÚaccess_token_expired)r   s    r   r6   r6   “   sL   € Ýð 
�: kµ6´;Ô3JÔ3VÑWÔWð 
ØÔ Ð ð Ô$¨DÐ0ð 5ØÔ4Ð4ð	
r   c                 ó¼   — | €d S t          | j        d¦  «        r| j        j        S t          | d¦  «        r&t          | j        t          j        ¦  «        s| j        S d S )Nr   )Úhasattrr3   r   r   r.   r   r$   s    r   Úget_credentials_from_httpr@   �   si   € Ø€|ØˆtÝ	�”˜}Ñ	-Ô	-ð ØŒ|Ô'Ð'Ý	��}Ñ	%Ô	%ð ­jØÔ�(Ô.ñ/ô /ð ð ÔÐàˆtr   )NN)Ú__doc__r.   Úgoogle.authr   Úgoogle.auth.credentialsr   ÚImportErrorr'   r   Úoauth2client.clientr   r   r   r!   r+   r4   r9   r6   r@   © r   r   ú<module>rG      ss  ðð DÐ Cà €€€ðØÐÐÐØ"Ð"Ð"Ð"à€O€OøØð ð ð Ø€O€O€Oðøøøð ØÐÐÐÐøØð  ð  ð  ØÐÐÐð øøøðØÐÐÐØÐÐÐàÐÐøØð ð ð ØÐÐÐðøøøð

ð 

ð 

ð 

ð
ð 
ð 
ð 
ð*ð ð ð23ð 3ð 3ð6
1ð 
1ð 
1ð&ð &ð &ð
ð 
ð 
ð
ð 
ð 
ð 
ð 
s'   ˆ
 “œ¡& ¦0¯0´
? ¿A	ÁA	