Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/oauth2client/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/oauth2client/__pycache__/clientsecrets.cpython-38.pyc
U

O��g��@s�dZddlZddlZdZdZeddddd	gddgd
�eddddd	gddgd
�iZGdd�de�ZGd
d�de�Zdd�Z	dd�Z
dd�Zdd�Zddd�Z
dS)z�Utilities for reading OAuth 2.0 client secret files.

A client_secrets.json file contains all the information needed to interact with
an OAuth 2.0 protected service.
�NZweb�	installedZ	client_idZ
client_secretZ
redirect_urisZauth_uriZ	token_uri)�required�stringc@seZdZdZdS)�ErrorzBase error for this module.N��__name__�
__module__�__qualname__�__doc__�rr�G/opt/cppython/lib/python3.8/site-packages/oauth2client/clientsecrets.pyr<src@seZdZdZdS)�InvalidClientSecretsErrorz(Format of ClientSecrets file is invalid.Nrrrrrr
@sr
c	Cs�d}|dkrt|��z|��\\}}Wn$ttfk
rJt|d��YnX|tkrbtd�|���t|dD]}||krntd�||���qnt|dD] }||�d�r�td	�|���q�||fS)
z�Validate parsed client secrets from a file.

    Args:
        clientsecrets_dict: dict, a dictionary holding the client secrets.

    Returns:
        tuple, a string of the client type and the information parsed
        from the file.
    ziInvalid file format. See https://developers.google.com/api-client-library/python/guide/aaa_client_secretsNzU Expected a JSON object with a single property for a "web" or "installed" applicationzUnknown client type: {0}.rz1Missing property "{0}" in a client type of "{1}".rz[[z!Property "{0}" is not configured.)r
�items�
ValueError�AttributeError�VALID_CLIENT�format�
startswith)Zclientsecrets_dictZ_INVALID_FILE_FORMAT_MSG�client_type�client_infoZ	prop_namerrr�_validate_clientsecretsDs8��
����rcCst�|�}t|�S�N)�json�loadr)�fp�objrrrrms
rcCst�|�}t|�Sr)r�loadsr)�srrrrrrs
rc
Csdz$t|d��}t�|�}W5QRXWn6tk
rZ}ztd|j|j|j��W5d}~XYnXt|�S)N�rzError opening file)	�openrr�IOErrorr
�filename�strerror�errnor)r!rr�excrrr�	_loadfilews�r%cCsXd}|st|�S|j||d�}|dkrJt|�\}}||i}|j|||d�tt�|��S)a�Loading of client_secrets JSON file, optionally backed by a cache.

    Typical cache storage would be App Engine memcache service,
    but you can pass in any other cache client that implements
    these methods:

    * ``get(key, namespace=ns)``
    * ``set(key, value, namespace=ns)``

    Usage::

        # without caching
        client_type, client_info = loadfile('secrets.json')
        # using App Engine memcache service
        from google.appengine.api import memcache
        client_type, client_info = loadfile('secrets.json', cache=memcache)

    Args:
        filename: string, Path to a client_secrets.json file on a filesystem.
        cache: An optional cache service client that implements get() and set()
        methods. If not specified, the file is always being loaded from
                 a filesystem.

    Raises:
        InvalidClientSecretsError: In case of a validation error or some
                                   I/O failure. Can happen only on cache miss.

    Returns:
        (client_type, client_info) tuple, as _loadfile() normally would.
        JSON contents is validated only during first load. Cache hits are not
        validated.
    zoauth2client:secrets#ns)�	namespaceN)r%�get�set�next�six�	iteritems)r!�cacheZ_SECRET_NAMESPACErrrrrr�loadfile�s!r-)N)r
rr*ZTYPE_WEBZTYPE_INSTALLEDr�	Exceptionrr
rrrr%r-rrrr�<module>sD���
����)

F1le Man4ger