HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/googleapiclient/__pycache__/_auth.cpython-310.pyc
o

�hh�@s�dZddlZzddlZddlZdZWneydZYnwzddlZWney/dZYnwzddlZddl	ZdZ
WneyGdZ
Ynwddd�Zddd�Zd	d
�Z
dd�Zd
d�Zdd�Zdd�Zdd�ZdS)z=Helpers for authentication using oauth2client or google-auth.�NTFcCs&trtjj|||d�\}}|Std��)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)�filenamerr�credentials�_�r
�H/usr/local/CyberCP/lib/python3.10/site-packages/googleapiclient/_auth.py�credentials_from_file)s
��rcCsLtrtjj||d�\}}|Str"|dus|durtd��tjj�	�Std��)z(Returns Application Default Credentials.rNzwclient_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.)
rrr�default�HAS_OAUTH2CLIENTr	�oauth2client�client�GoogleCredentials�get_application_default)rrrrr
r
r�default_credentials6s
���rcCsVtrt|tjjj�rtjj�||�Sz
|��r|�|�WS|WSt	y*|YSw)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�
isinstancerrr�Credentials�with_scopes_if_required�create_scoped_required�
create_scoped�AttributeError)rrr
r
r�with_scopesKs
�rcCsLddlm}tr t|tjjj�r tdurt	d��tj
||�d�S|�|��S)aaReturns 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.httprrrrrrr�google_auth_httplib2�
ValueError�AuthorizedHttp�	authorize)rrr
r
r�authorized_httpds�r&cCs:t��}trt|tjjj�rt�	|�}|�
|�S|�
|�S�N)�httplib2�Httprrrrrrr"�Request�refresh)r�refresh_http�requestr
r
r�refresh_credentialss



r.cCst|�st|�|�|�Sr')�is_validr.�apply)r�headersr
r
r�apply_credentials�s
r2cCs,tr
t|tjjj�r
|jS|jduo|jSr')	rrrrrr�valid�access_token�access_token_expired)rr
r
rr/�s

�r/cCsB|durdSt|jd�r|jjSt|d�rt|jtj�s|jSdS)Nr)�hasattrr-rrr(rrr
r
r�get_credentials_from_http�s�r7)NN)�__doc__r(�google.authr�google.auth.credentialsr�ImportErrorr"r�oauth2client.clientrrrrr&r.r2r/r7r
r
r
r�<module>s:���