
    (ph              
          S r SSKJr  SSKJr  SSKrSSKrSSKrSSK	r SSK
rSSKrSSKr SSKrSrSrS	 rS
 rS rS r\R.                  R0                  \\R.                  R2                  \\R4                  R6                  \\R4                  R8                  \\R:                  R<                  R>                  \0r \(       a#  \\ \R:                  RB                  R>                  '   S r"g! \ a  r\" S5      \eSrCff = f! \ a    Sr Nf = f)zHelpers for transitioning from oauth2client to google-auth.

.. warning::
    This module is private as it is intended to assist first-party downstream
    clients with the transition from oauth2client to google-auth.
    )absolute_import)_helpersNzoauth2client is not installed.TFz8Unable to convert {} to a google-auth credentials class.c           	          [         R                  R                  R                  U R                  U R
                  U R                  U R                  U R                  U R                  S9nU R                  Ul        U$ )a&  Converts to :class:`google.oauth2.credentials.Credentials`.

Args:
    credentials (Union[oauth2client.client.OAuth2Credentials,
        oauth2client.client.GoogleCredentials]): The credentials to
        convert.

Returns:
    google.oauth2.credentials.Credentials: The converted credentials.
)tokenrefresh_token	token_uri	client_idclient_secretscopes)googleoauth2credentialsCredentialsaccess_tokenr   r   r	   r
   r   token_expiry_expires)r   new_credentialss     L/var/www/html/venv/lib/python3.13/site-packages/google/auth/_oauth2client.py_convert_oauth2_credentialsr   0   so     mm//;;&&!//''''!//!! < O  +77O    c                     U R                   R                  5       nU R                  US'   [        R                  R
                  R                  R                  U5      $ )aU  Converts to :class:`google.oauth2.service_account.Credentials`.

Args:
    credentials (Union[
        oauth2client.service_account.ServiceAccountCredentials,
        oauth2client.service_account._JWTAccessCredentials]): The
        credentials to convert.

Returns:
    google.oauth2.service_account.Credentials: The converted credentials.
r   )serialization_datacopyr   r   r   service_accountr   from_service_account_info)r   infos     r   $_convert_service_account_credentialsr   I   sI     ))..0D#--D==((44NNtTTr   c                 d    [         R                  R                  R                  U R                  S9$ )a   Converts to :class:`google.auth.compute_engine.Credentials`.

Args:
    credentials (oauth2client.contrib.gce.AppAssertionCredentials): The
        credentials to convert.

Returns:
    google.oauth2.service_account.Credentials: The converted credentials.
)service_account_email)r   authcompute_enginer   r   r   s    r   &_convert_gce_app_assertion_credentialsr#   Z   s/     ;;%%11)?? 2  r   c                     [         R                  R                  R                  [        R
                  " U R                  5      U R                  S9$ )a  Converts to :class:`google.auth.app_engine.Credentials`.

Args:
    credentials (oauth2client.contrib.app_engine.AppAssertionCredentials):
        The credentials to convert.

Returns:
    google.oauth2.service_account.Credentials: The converted credentials.
)r   service_account_id)r   r    
app_enginer   r   string_to_scopesscoper%   r"   s    r   ,_convert_appengine_app_assertion_credentialsr)   i   sC     ;;!!--(():):;&99 .  r   c                     [        U 5      n [        U   " U 5      $ ! [         a%  n[        [        R                  U5      5      nX2eSnAff = f)a  Convert oauth2client credentials to google-auth credentials.

This class converts:

- :class:`oauth2client.client.OAuth2Credentials` to
  :class:`google.oauth2.credentials.Credentials`.
- :class:`oauth2client.client.GoogleCredentials` to
  :class:`google.oauth2.credentials.Credentials`.
- :class:`oauth2client.service_account.ServiceAccountCredentials` to
  :class:`google.oauth2.service_account.Credentials`.
- :class:`oauth2client.service_account._JWTAccessCredentials` to
  :class:`google.oauth2.service_account.Credentials`.
- :class:`oauth2client.contrib.gce.AppAssertionCredentials` to
  :class:`google.auth.compute_engine.Credentials`.
- :class:`oauth2client.contrib.appengine.AppAssertionCredentials` to
  :class:`google.auth.app_engine.Credentials`.

Returns:
    google.auth.credentials.Credentials: The converted credentials.

Raises:
    ValueError: If the credentials could not be converted.
N)type_CLASS_CONVERSION_MAPKeyError
ValueError_CONVERT_ERROR_TMPLformat)r   credentials_class
caught_excnew_excs       r   convertr4      sR    2 [)&$%67DD &0778IJK%&s    
A AA)#__doc__
__future__r   google.authr   google.auth.app_enginer   google.auth.compute_enginegoogle.oauth2.credentialsgoogle.oauth2.service_accountoauth2client.clientoauth2clientoauth2client.contrib.gceoauth2client.service_accountImportErrorr2   oauth2client.contrib.appengine_HAS_APPENGINEr/   r   r   r#   r)   clientOAuth2CredentialsGoogleCredentialsr   ServiceAccountCredentials_JWTAccessCredentialscontribgceAppAssertionCredentialsr,   	appenginer4    r   r   <module>rM      s(   '    !   $H#')N
 Q 2U"$ ))+F))+F  ::<`  668\446\   	5 &&>>
&M  H
6
7ZGH  Ns(   C) D  )C=/	C88C= D
D