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/lib64/python3.10/site-packages/google/auth/__pycache__/api_key.cpython-310.pyc
o

�h
�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z�Google API key support.
This module provides authentication using the `API key`_.
.. _API key:
    https://cloud.google.com/docs/authentication/api-keys/
�)�_helpers)�credentials)�
exceptionscs^eZdZdZ�fdd�Zedd��Zedd��Ze�	e
j�dd	��Zddd�Z
d
d�Z�ZS)�CredentialszeAPI key credentials.
    These credentials use API key to provide authorization to applications.
    cs&tt|���|st�d��||_dS)z�
        Args:
            token (str): API key string
        Raises:
            ValueError: If the provided API key is not a non-empty string.
        z(Token must be a non-empty API key stringN)�superr�__init__r�InvalidValue�token)�selfr	��	__class__��F/usr/local/CyberCP/lib/python3.10/site-packages/google/auth/api_key.pyrs

zCredentials.__init__cC�dS)NFr
�r
r
r
r�expired+�zCredentials.expiredcCr)NTr
rr
r
r�valid/rzCredentials.validcCsdS�Nr
)r
�requestr
r
r�refresh3rzCredentials.refreshNcCs|p|j|d<dS)z�Apply the API key token to the x-goog-api-key header.
        Args:
            headers (Mapping): The HTTP request headers.
            token (Optional[str]): If specified, overrides the current access
                token.
        zx-goog-api-keyN)r	)r
�headersr	r
r
r�apply7szCredentials.applycCs|�|�dS)aPerforms credential-specific before request logic.
        Refreshes the credentials if necessary, then calls :meth:`apply` to
        apply the token to the x-goog-api-key header.
        Args:
            request (google.auth.transport.Request): The object used to make
                HTTP requests.
            method (str): The request's HTTP method or the RPC method being
                invoked.
            url (str): The request's URI or the RPC service's URI.
            headers (Mapping): The request's headers.
        N)r)r
r�method�urlrr
r
r�before_request@szCredentials.before_requestr)�__name__�
__module__�__qualname__�__doc__r�propertyrrr�copy_docstringrrrrr�
__classcell__r
r
rrrs




	rN)r�google.authrrrrr
r
r
r�<module>s