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/google/auth/__pycache__/_cloud_sdk.cpython-310.pyc
o

�h\�@s�dZddlZddlZddlmZddlmZddlmZdZdZdZ	dZ
d	Zd
ZdZ
dZd
d�Zdd�Zdd�Zdd�Zddd�ZdS)z9Helpers for reading the Google Cloud SDK's configuration.�N)�_helpers)�environment_vars)�
exceptions�gcloud�APPDATAz$application_default_credentials.jsonz
gcloud.cmd)�config�get�project)�authzprint-access-tokenzH764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.comcCs�ztjtjWStyYnwtjdkr"tj�tj�d�dt	�Sztj�tjt
t	�WStyEtj�dd�}tj�|dt	�YSw)z�Returns the absolute path the the Cloud SDK's configuration directory.

    Returns:
        str: The Cloud SDK config path.
    �nt�~z.config�SystemDrivezC:�\)�os�environr�CLOUD_SDK_CONFIG_DIR�KeyError�name�path�join�
expanduser�_CONFIG_DIRECTORY�_WINDOWS_CONFIG_ROOT_ENV_VARr)�drive�r�I/usr/local/CyberCP/lib/python3.10/site-packages/google/auth/_cloud_sdk.py�get_config_path-s�

��rcCst�}tj�|t�S)z�Gets the path to the application default credentials file.

    The path may or may not exist.

    Returns:
        str: The full path to application default credentials.
    )rrrr�_CREDENTIALS_FILENAME)�config_pathrrr�(get_application_default_credentials_pathIsrcCs@ttjd��}tj||d�}Wd�|S1swY|S)zJ Return subprocess.check_output with the given command and ignores stderr.�w��stderrN)�openr�devnull�
subprocess�check_output)�commandr$�outputrrr�_run_subprocess_ignore_stderrUs
��r)c
Cs^tjdkrt}nt}zt|ft�}t�|���}|r|WSdWSt	j
ttfy.YdSw)zaGets the project ID from the Cloud SDK.

    Returns:
        Optional[str]: The project ID.
    rN)
rr�_CLOUD_SDK_WINDOWS_COMMAND�_CLOUD_SDK_POSIX_COMMANDr)�%_CLOUD_SDK_CONFIG_GET_PROJECT_COMMANDr�
from_bytes�stripr%�CalledProcessError�OSError�IOError)r'r	rrr�get_project_id\s
��r2c
Cs�tjdkrt}nt}z"|r|ftd|f}n|ft}tj|tjd�}|�d��	�WStj
ttfyE}z	t
�d|�}||�d}~ww)a�Load user access token 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.

    Returns:
        str: The user access token.

    Raises:
        google.auth.exceptions.UserAccessTokenError: if failed to get access
            token from gcloud.
    rz
--account=r!zutf-8zFailed to obtain access tokenN)rrr*r+�$_CLOUD_SDK_USER_ACCESS_TOKEN_COMMANDr%r&�STDOUT�decoder.r/r0r1r�UserAccessTokenError)�accountr'�access_token�
caught_exc�new_excrrr�get_auth_access_tokenus*
���
���r;)N)�__doc__rr%�google.authrrrrrrr+r*r,r3�CLOUD_SDK_CLIENT_IDrrr)r2r;rrrr�<module>s(�