HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/cppython/lib/python3.8/site-packages/google/auth/__pycache__/api_key.cpython-38.pyc
U

KD�g
�@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__rZInvalidValue�token)�selfr��	__class__��@/opt/cppython/lib/python3.8/site-packages/google/auth/api_key.pyrs
zCredentials.__init__cCsdS)NFr�r	rrr
�expired+szCredentials.expiredcCsdS)NTrrrrr
�valid/szCredentials.validcCsdS)Nr)r	�requestrrr
�refresh3szCredentials.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	�headersrr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_request)N)�__name__�
__module__�__qualname__�__doc__r�propertyrrrZcopy_docstringrrrrr�
__classcell__rrr
r
rs




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