
    (ph
                     B    S r SSKrSSKJr   " S S\R                  S9rg)zInterface for base credentials.    N)_helpersc                   L    \ rS rSrSrS r\R                  S 5       rSS jr	Sr
g)	_BaseCredentials   a  Base class for all credentials.

All credentials have a :attr:`token` that is used for authentication and
may also optionally set an :attr:`expiry` to indicate when the token will
no longer be valid.

Most credentials will be :attr:`invalid` until :meth:`refresh` is called.
Credentials can do this automatically before the first HTTP request in
:meth:`before_request`.

Although the token and expiration will change as the credentials are
:meth:`refreshed <refresh>` and used, credentials should be considered
immutable. Various credentials will accept configuration such as private
keys, scopes, and other options. These options are not changeable after
construction. Some classes will provide mechanisms to copy the credentials
with modifications such as :meth:`ScopedCredentials.with_scopes`.

Attributes:
    token (Optional[str]): The bearer token that can be used in HTTP headers to make
        authenticated requests.
c                     S U l         g Ntoken)selfs    P/var/www/html/venv/lib/python3.13/site-packages/google/auth/_credentials_base.py__init___BaseCredentials.__init__.   s	    
    c                     [        S5      e)zRefreshes the access token.

Args:
    request (google.auth.transport.Request): The object used to make
        HTTP requests.

Raises:
    google.auth.exceptions.RefreshError: If the credentials could
        not be refreshed.
zRefresh must be implemented)NotImplementedError)r   requests     r   refresh_BaseCredentials.refresh1   s     ""?@@r   Nc                 z    SR                  [        R                  " U=(       d    U R                  5      5      US'   g)zApply the token to the authentication header.

Args:
    headers (Mapping): The HTTP request headers.
    token (Optional[str]): If specified, overrides the current access
        token.
z	Bearer {}authorizationN)formatr   
from_bytesr
   )r   headersr
   s      r   _apply_BaseCredentials._applyA   s0     $/#5#5 34$
 r   r	   r   )__name__
__module____qualname____firstlineno____doc__r   abcabstractmethodr   r   __static_attributes__ r   r   r   r      s-    , 	A A

r   r   )	metaclass)r    r!   google.authr   ABCMetar   r$   r   r   <module>r(      s      & 
  4
 4
r   