
    ]jdq                        U d Z ddlZddlmZ ddlZddlZddlmZmZm	Z	m
Z
 ddlmZ ddlZddlmZmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ e
rddlZdZg Zee   ed<   dZ ej>                  d      Z  G d de      Z! G d de!      Z" G d de!      Z# G d de!      Z$ G d de!      Z% G d de!      Z& G d dejN                        Z( G d d e(      Z)d(d!Z* G d" d#ejN                        Z+ G d$ d%e      Z, G d& d'e%      Z-y))zInterfaces for credentials.    N)Enum)DictListOptionalTYPE_CHECKING)urlparse)_helpersenvironment_vars)_regional_access_boundary_utils)
exceptions)metrics)_BaseCredentials)RefreshThreadManagerzgoogleapis.comNO_OP_TRUST_BOUNDARY_LOCATIONS0x0zgoogle.auth._defaultc                        e Zd ZdZ fdZed        Zed        Zed        Zed        Z	ed        Z
d Zej                  d	        Zd
 ZddZd Zd Zd Zd Z xZS )CredentialsaQ  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`.
    c                     t         t        |           d | _        	 d | _        	 d | _        	 t        | _        	 d| _        t               | _
        y NF)superr   __init__expiry_quota_project_id_trust_boundaryDEFAULT_UNIVERSE_DOMAIN_universe_domain_use_non_blocking_refreshr   _refresh_workerself	__class__s    A/root/env/lib/python3.12/site-packages/google/auth/credentials.pyr   zCredentials.__init__B   sY    k4)+	B!%K#	 !8	 */&35    c                     | j                   sy| j                   t        j                  z
  }t        j                         |k\  S )a(  Checks if the credentials are expired.

        Note that credentials can be invalid but not expired because
        Credentials with :attr:`expiry` set to None is considered to never
        expire.

        .. deprecated:: v2.24.0
          Prefer checking :attr:`token_state` instead.
        F)r   r	   REFRESH_THRESHOLDutcnow)r    skewed_expirys     r"   expiredzCredentials.expiredU   s6     {{ h&@&@@ M11r#   c                 <    | j                   duxr | j                   S )zChecks the validity of the credentials.

        This is True if the credentials have a :attr:`token` and the token
        is not :attr:`expired`.

        .. deprecated:: v2.24.0
          Prefer checking :attr:`token_state` instead.
        N)tokenr(   r    s    r"   validzCredentials.validg   s     zz%:dll*::r#   c                    | j                   t        j                  S | j                  t        j                  S t        j                         | j                  k\  }|rt        j                  S t        j                         | j                  t
        j                  z
  k\  }|rt        j                  S t        j                  S )z(
        See `:obj:`TokenState`
        )	r*   
TokenStateINVALIDr   FRESHr	   r&   r%   STALE)r    r(   is_stales      r"   token_statezCredentials.token_states   s    
 ::%%% ;;###//#t{{2%%%??$x7Q7Q)QR###r#   c                     | j                   S )z.Project to use for quota and billing purposes.)r   r+   s    r"   quota_project_idzCredentials.quota_project_id   s     %%%r#   c                     | j                   S )zThe universe domain value.)r   r+   s    r"   universe_domainzCredentials.universe_domain   s     $$$r#   c                      y)zThe credential information JSON.

        The credential information will be added to auth related error messages
        by client library.

        Returns:
            Mapping[str, str]: The credential information JSON.
        N r+   s    r"   get_cred_infozCredentials.get_cred_info   s     r#   c                     t        d      )  Refreshes 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"   refreshzCredentials.refresh   s     ""?@@r#   c                      y)a  The x-goog-api-client header for token usage metric.

        This header will be added to the API service requests in before_request
        method. For example, "cred-type/sa-jwt" means service account self
        signed jwt access token is used in the API service request
        authorization header. Children credentials classes need to override
        this method to provide the header value, if the token usage metric is
        needed.

        Returns:
            str: The x-goog-api-client header value.
        Nr9   r+   s    r"   _metric_header_for_usagez$Credentials._metric_header_for_usage   s     r#   c                 `    | j                  ||       | j                  r| j                  |d<   yy)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x-goog-user-projectN)_applyr5   r    headersr*   s      r"   applyzCredentials.apply   s1     	GU#  -1-B-BG)* !r#   c                 @    | j                   s| j                  |       y y N)r,   rA   r?   s     r"   _blocking_refreshzCredentials._blocking_refresh   s    zzLL! r#   c                    d}| j                   t        j                  k(  r| j                  j	                  | |       }| j                   t        j
                  k(  s|r,| j                  |       | j                  j                          y y r   )r3   r.   r1   r   start_refreshr/   rA   clear_error)r    r@   use_blocking_refresh_fallbacks      r"   _non_blocking_refreshz!Credentials._non_blocking_refresh   s|    (-%z///040D0D0R0Rg1 -) z1115RLL!   ,,. 6Sr#   c                     | j                   r| j                  |       n| j                  |       t        j                  || j                                | j                  |       y)a  Performs credential-specific before request logic.

        Refreshes the credentials if necessary, then calls :meth:`apply` to
        apply the token to the authentication 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   rP   rK   r   add_metric_headerrC   rH   r    r@   methodurlrG   s        r"   before_requestzCredentials.before_request   sN    " ))&&w/""7+!!'4+H+H+JK

7r#   c                     d| _         y )NT)r   r+   s    r"   with_non_blocking_refreshz%Credentials.with_non_blocking_refresh   s
    )-&r#   rJ   )__name__
__module____qualname____doc__r   propertyr(   r,   r3   r5   r7   r:   abcabstractmethodrA   rC   rH   rK   rP   rV   rX   __classcell__r!   s   @r"   r   r   /   s    $6& 2 2" 	; 	;    * & & % %	 	A A
C"/2.r#   r   c                       e Zd ZdZd Zd Zy)CredentialsWithQuotaProjectzGAbstract base for credentials supporting ``with_quota_project`` factoryc                     t        d      )a  Returns a copy of these credentials with a modified quota project.

        Args:
            quota_project_id (str): The project to use for quota and
                billing purposes

        Returns:
            google.auth.credentials.Credentials: A new credentials instance.
        z/This credential does not support quota project.r=   )r    r5   s     r"   with_quota_projectz.CredentialsWithQuotaProject.with_quota_project   s     ""STTr#   c                     t         j                  j                  t        j                        }|r| j                  |      S | S rJ   )osenvirongetr
   GOOGLE_CLOUD_QUOTA_PROJECTre   )r    quota_from_envs     r"   #with_quota_project_from_environmentz?CredentialsWithQuotaProject.with_quota_project_from_environment  s4    (8(S(ST**>::r#   N)rY   rZ   r[   r\   re   rl   r9   r#   r"   rc   rc      s    Q
Ur#   rc   c                       e Zd ZdZd Zy)CredentialsWithTokenUrizCAbstract base for credentials supporting ``with_token_uri`` factoryc                     t        d      )a   Returns a copy of these credentials with a modified token uri.

        Args:
            token_uri (str): The uri to use for fetching/exchanging tokens

        Returns:
            google.auth.credentials.Credentials: A new credentials instance.
        z'This credential does not use token uri.r=   )r    	token_uris     r"   with_token_uriz&CredentialsWithTokenUri.with_token_uri  s     ""KLLr#   N)rY   rZ   r[   r\   rq   r9   r#   r"   rn   rn     s    M	Mr#   rn   c                       e Zd ZdZd Zy)CredentialsWithUniverseDomainzIAbstract base for credentials supporting ``with_universe_domain`` factoryc                     t        d      )zReturns a copy of these credentials with a modified universe domain.

        Args:
            universe_domain (str): The universe domain to use

        Returns:
            google.auth.credentials.Credentials: A new credentials instance.
        z6This credential does not support with_universe_domain.r=   )r    r7   s     r"   with_universe_domainz2CredentialsWithUniverseDomain.with_universe_domain!  s     "D
 	
r#   N)rY   rZ   r[   r\   ru   r9   r#   r"   rs   rs     s
    S
r#   rs   c                        e Zd ZdZ fdZed        Zed        Zej                  d        Z
d Zd Zd Zd	 Zd
 Zd Zd fd	Zd Zd Z	 ddddeddfdZej                  	 d	 dd       Z xZS )%CredentialsWithRegionalAccessBoundaryzPAbstract base for credentials supporting regional access boundary configuration.c                 T    t         |           t        j                         | _        y rJ   )r   r   r   _RegionalAccessBoundaryManager_rab_managerr   s    r"   r   z.CredentialsWithRegionalAccessBoundary.__init__2  s"    +JJL 	r#   c                 B    | j                   j                  j                  S )z>Optional[str]: The encoded Regional Access Boundary locations.)rz   _dataencoded_locationsr+   s    r"   regional_access_boundaryz>CredentialsWithRegionalAccessBoundary.regional_access_boundary8  s       &&888r#   c                 B    | j                   j                  j                  S )zQOptional[datetime.datetime]: The expiration time of the Regional Access Boundary.)rz   r|   r   r+   s    r"   regional_access_boundary_expiryzECredentialsWithRegionalAccessBoundary.regional_access_boundary_expiry=  s       &&---r#   c                     t        d      )r<   z*_perform_refresh_token must be implementedr=   r?   s     r"   _perform_refresh_tokenz<CredentialsWithRegionalAccessBoundary._perform_refresh_tokenB  s     ""NOOr#   c                 ~    ddl } |j                  dt        d       t        | dd      }|r |       S t	        d      )a  Returns a copy of these credentials.

        .. deprecated::
            Manual Regional Access Boundary overrides are not supported.
            This method is maintained for backwards compatibility and
            returns a copy of the credentials without modifying the
            Regional Access Boundary state.

        Args:
            trust_boundary (Mapping[str, str]): Ignored.

        Returns:
            google.auth.credentials.Credentials: A new credentials instance.
        r   Nz4with_trust_boundary is deprecated and has no effect.   
stacklevel
_make_copyz2This credential does not support trust boundaries.)warningswarnDeprecationWarninggetattrr>   )r    trust_boundaryr   	make_copys       r"   with_trust_boundaryz9CredentialsWithRegionalAccessBoundary.with_trust_boundaryP  sI     	B	

 D,5	;%D r#   c                 p    t        j                         }| j                  j                  |_        ||_        y)z@Copies the regional access boundary manager to another instance.N)r   ry   rz   r|   )r    targetnew_managers      r"   &_copy_regional_access_boundary_managerzLCredentialsWithRegionalAccessBoundary._copy_regional_access_boundary_managern  s.     6TTV --33)r#   c                     | j                   j                  |j                  dd      |j                  dd             | S )a0  Applies the regional_access_boundary provided via the seed on these
        credentials. This is intended for internal use only as invalid
        seeds would produce unexpected results until automatic recovery is supported.
        Currently this is used by the gcloud CLI and therefore changes to the
        contract MUST be backwards compatible (e.g. the method signature must be
        unchanged and the credentials with the RAB set must be returned).


        Returns:
            google.auth.credentials.Credentials: The credentials instance.
        encodedLocationsNr   )r}   r   )rz   $set_initial_regional_access_boundaryri   )r    seeds     r"   _set_regional_access_boundaryzCCredentialsWithRegionalAccessBoundary._set_regional_access_boundaryv  sA     	>>"hh'94@88Hd+ 	? 	
 r#   c                 :    | j                   j                          | S )a  Enables the blocking lookup mode on these credentials.
        This is intended for internal use only as blocking lookup requires additional
        care and consideration. Currently this is used by the gcloud CLI and
        therefore changes to the contract MUST be backwards compatible (e.g. the
        method signature must be unchanged and the credentials with the
        blocking lookup flag set to true must be returned).

        Returns:
            google.auth.credentials.Credentials: The credentials instance.
        )rz   enable_blocking_lookupr+   s    r"   -_set_blocking_regional_access_boundary_lookupzSCredentialsWithRegionalAccessBoundary._set_blocking_regional_access_boundary_lookup  s     	002r#   c                     	 t        |      j                  }|r#|j                  d      s|j                  d      ry| j                         sy| j                  j                  | |       y# t        t        f$ r Y ?w xY w)a  
        Starts a background thread to refresh the Regional Access Boundary if needed.

        This method checks if a refresh is necessary and if one is not already
        in progress or in a cooldown period. If so, it starts a background
        thread to perform the lookup.

        Args:
            request (google.auth.transport.Request): The object used to make
                HTTP requests.
            url (str): The URL of the request.
        z.rep.googleapis.comz.rep.sandbox.googleapis.comN)r   hostnameendswith
ValueError	TypeError,_is_regional_access_boundary_lookup_requiredrz   maybe_start_refresh)r    r@   rU   r   s       r"   -_maybe_start_regional_access_boundary_refreshzSCredentialsWithRegionalAccessBoundary._maybe_start_regional_access_boundary_refresh  s|    
	}--H!!"78$$%BC @@B 	--dG< I& 		s   9A* *A<;A<c                 V    t        j                         sy| j                  t        k7  ryy)a/  Checks if a Regional Access Boundary lookup is required.

        A lookup is required if the feature is enabled via an environment
        variable and the universe domain is supported.

        Returns:
            bool: True if a Regional Access Boundary lookup is required, False otherwise.
        FT)r   #is_regional_access_boundary_enabledr7   r   r+   s    r"   r   zRCredentialsWithRegionalAccessBoundary._is_regional_access_boundary_lookup_required  s*     /RRT #::r#   c                 \    t         |   ||       | j                  j                  |       y)z-Apply the token to the authentication header.N)r   rH   rz   apply_headers)r    rG   r*   r!   s      r"   rH   z+CredentialsWithRegionalAccessBoundary.apply  s%    gu%''0r#   c                     | j                   r| j                  |       n| j                  |       | j                  ||       t	        j
                  || j                                | j                  |       y)zjRefreshes the access token and triggers the Regional Access Boundary
        lookup if necessary.
        N)r   rP   rK   r   r   rR   rC   rH   rS   s        r"   rV   z4CredentialsWithRegionalAccessBoundary.before_request  s^     ))&&w/""7+::7CH!!'4+H+H+JK

7r#   c                 &    | j                  |       y)zRefreshes the access token.

        This method calls the subclass's token refresh logic. The Regional
        Access Boundary is refreshed separately in a non-blocking way.
        N)r   r?   s     r"   rA   z-CredentialsWithRegionalAccessBoundary.refresh  s     	##G,r#   r@   zgoogle.auth.transport.Request	fail_fastreturnzOptional[Dict[str, str]]c                     ddl m} | j                  |      }|st        j	                  d       yi }| j                  |       | j                  j                  |       |j                  ||||      S )a  Calls the Regional Access Boundary lookup API to retrieve the Regional Access Boundary information.

        Args:
            request (google.auth.transport.Request): The object used to make
                HTTP requests.
            fail_fast (bool): Whether the lookup should fail fast (short timeout, no retries).

        Returns:
            Optional[Dict[str, str]]: The Regional Access Boundary information returned by the lookup API, or None if the lookup failed.
        r   )_client)r@   z4Failed to build Regional Access Boundary lookup URL.N)rG   r   )	google.oauth2r   *_build_regional_access_boundary_lookup_url_LOGGERerrorrE   rz   r    _lookup_regional_access_boundary)r    r@   r   r   rU   rG   s         r"   r   zFCredentialsWithRegionalAccessBoundary._lookup_regional_access_boundary  ss     	*==g=NMMPQ"$G''077S'Y 8 
 	
r#   c                     t        d      )a  
        Builds and returns the URL for the Regional Access Boundary lookup API.

        This method should be implemented by subclasses to provide the
        specific URL based on the credential type and its properties.

        Args:
            request (Optional[google.auth.transport.Request]): The object used
                to make HTTP requests. In some subclasses, this may be used to
                make an initial network call to resolve required metadata for the
                URL.

        Returns:
            str: The URL for the Regional Access Boundary lookup endpoint, or None
                 if lookup should be skipped (e.g., for non-applicable universe domains).
        z>_build_regional_access_boundary_lookup_url must be implementedr=   r?   s     r"   r   zPCredentialsWithRegionalAccessBoundary._build_regional_access_boundary_lookup_url  s    ( "L
 	
r#   rJ   )F)r@   z'Optional[google.auth.transport.Request])rY   rZ   r[   r\   r   r]   r~   r   r^   r_   r   r   r   r   r   r   r   rH   rV   rA   boolr   r   r`   ra   s   @r"   rw   rw   /  s    Z
 9 9 . . 	P P<*$=@&1
-  
0
 
 
$	
: 	CG
@
 
r#   rw   c                   D    e Zd ZdZed        Zed        Zd ZddZd Z	y)	AnonymousCredentialszCredentials that do not provide any authentication information.

    These are useful in the case of services that support anonymous access or
    local service emulators that do not use credentials.
    c                      y)z4Returns `False`, anonymous credentials never expire.Fr9   r+   s    r"   r(   zAnonymousCredentials.expired!       r#   c                      y)z7Returns `True`, anonymous credentials are always valid.Tr9   r+   s    r"   r,   zAnonymousCredentials.valid&  s     r#   c                 ,    t        j                  d      )zVRaises :class:``InvalidOperation``, anonymous credentials cannot be
        refreshed.z*Anonymous credentials cannot be refreshed.)r   InvalidOperationr?   s     r"   rA   zAnonymousCredentials.refresh+  s     ))*VWWr#   Nc                 2    |t        j                  d      y)zAnonymous credentials do nothing to the request.

        The optional ``token`` argument is not supported.

        Raises:
            google.auth.exceptions.InvalidValue: If a token was specified.
        Nz+Anonymous credentials don't support tokens.)r   InvalidValuerF   s      r"   rH   zAnonymousCredentials.apply0  s!     ))*WXX r#   c                      y)z0Anonymous credentials do nothing to the request.Nr9   rS   s        r"   rV   z#AnonymousCredentials.before_request;  s    r#   rJ   )
rY   rZ   r[   r\   r]   r(   r,   rA   rH   rV   r9   r#   r"   r   r     s@        X
	Y?r#   r   c                   l     e Zd ZdZ fdZed        Zed        Zej                  d        Z
d Z xZS )ReadOnlyScopeda+  Interface for credentials whose scopes can be queried.

    OAuth 2.0-based credentials allow limiting access using scopes as described
    in `RFC6749 Section 3.3`_.
    If a credential class implements this interface then the credentials either
    use scopes in their implementation.

    Some credentials require scopes in order to obtain a token. You can check
    if scoping is necessary with :attr:`requires_scopes`::

        if credentials.requires_scopes:
            # Scoping is required.
            credentials = credentials.with_scopes(scopes=['one', 'two'])

    Credentials that require scopes must either be constructed with scopes::

        credentials = SomeScopedCredentials(scopes=['one', 'two'])

    Or must copy an existing instance using :meth:`with_scopes`::

        scoped_credentials = credentials.with_scopes(scopes=['one', 'two'])

    Some credentials have scopes but do not allow or require scopes to be set,
    these credentials can be used as-is.

    .. _RFC6749 Section 3.3: https://tools.ietf.org/html/rfc6749#section-3.3
    c                 F    t         t        |           d | _        d | _        y rJ   )r   r   r   _scopes_default_scopesr   s    r"   r   zReadOnlyScoped.__init__\  s    nd,.#r#   c                     | j                   S )z6Sequence[str]: the credentials' current set of scopes.)r   r+   s    r"   scopeszReadOnlyScoped.scopesa  s     ||r#   c                     | j                   S )z>Sequence[str]: the credentials' current set of default scopes.)r   r+   s    r"   default_scopeszReadOnlyScoped.default_scopesf  s     ###r#   c                      y)zCTrue if these credentials require scopes to obtain an access token.Fr9   r+   s    r"   requires_scopeszReadOnlyScoped.requires_scopesk  r   r#   c                     | j                   | j                   n| j                  }t        |      j                  t        |xs g             S )a_  Checks if the credentials have the given scopes.

        .. warning: This method is not guaranteed to be accurate if the
            credentials are :attr:`~Credentials.invalid`.

        Args:
            scopes (Sequence[str]): The list of scopes to check.

        Returns:
            bool: True if the credentials have the given scopes.
        )r   r   setissubset)r    r   credential_scopess      r"   
has_scopeszReadOnlyScoped.has_scopesp  sC     !LL4DLL$:N:N 	 6{##C(9(?R$@AAr#   )rY   rZ   r[   r\   r   r]   r   r   r^   abstractpropertyr   r   r`   ra   s   @r"   r   r   ?  sU    8$
   $ $ 	 Br#   r   )	metaclassc                   6    e Zd ZdZej
                  dd       Zy)Scopeda5  Interface for credentials whose scopes can be replaced while copying.

    OAuth 2.0-based credentials allow limiting access using scopes as described
    in `RFC6749 Section 3.3`_.
    If a credential class implements this interface then the credentials either
    use scopes in their implementation.

    Some credentials require scopes in order to obtain a token. You can check
    if scoping is necessary with :attr:`requires_scopes`::

        if credentials.requires_scopes:
            # Scoping is required.
            credentials = credentials.create_scoped(['one', 'two'])

    Credentials that require scopes must either be constructed with scopes::

        credentials = SomeScopedCredentials(scopes=['one', 'two'])

    Or must copy an existing instance using :meth:`with_scopes`::

        scoped_credentials = credentials.with_scopes(scopes=['one', 'two'])

    Some credentials have scopes but do not allow or require scopes to be set,
    these credentials can be used as-is.

    .. _RFC6749 Section 3.3: https://tools.ietf.org/html/rfc6749#section-3.3
    Nc                     t        d      )a  Create a copy of these credentials with the specified scopes.

        Args:
            scopes (Sequence[str]): The list of scopes to attach to the
                current credentials.

        Raises:
            NotImplementedError: If the credentials' scopes can not be changed.
                This can be avoided by checking :attr:`requires_scopes` before
                calling this method.
        z$This class does not require scoping.r=   )r    r   r   s      r"   with_scopeszScoped.with_scopes  s     ""HIIr#   rJ   )rY   rZ   r[   r\   r^   r_   r   r9   r#   r"   r   r     s#    8 	J Jr#   r   c                 d    t        | t              r| j                  r| j                  ||      S | S )a  Creates a copy of the credentials with scopes if scoping is required.

    This helper function is useful when you do not know (or care to know) the
    specific type of credentials you are using (such as when you use
    :func:`google.auth.default`). This function will call
    :meth:`Scoped.with_scopes` if the credentials are scoped credentials and if
    the credentials require scoping. Otherwise, it will return the credentials
    as-is.

    Args:
        credentials (google.auth.credentials.Credentials): The credentials to
            scope if necessary.
        scopes (Sequence[str]): The list of scopes to use.
        default_scopes (Sequence[str]): Default scopes passed by a
            Google client library. Use 'scopes' for user-defined scopes.

    Returns:
        google.auth.credentials.Credentials: Either a new set of scoped
            credentials, or the passed in credentials instance if no scoping
            was required.
    )r   )
isinstancer   r   r   )credentialsr   r   s      r"   with_scopes_if_requiredr     s2    , +v&;+F+F&&vn&MMr#   c                   |    e Zd ZdZej
                  d        Zej                  d        Zej                  d        Z	y)SigningzCInterface for credentials that can cryptographically sign messages.c                     t        d      )zSigns the given message.

        Args:
            message (bytes): The message to sign.

        Returns:
            bytes: The message's cryptographic signature.
        zSign bytes must be implemented.r=   )r    messages     r"   
sign_byteszSigning.sign_bytes  s     ""CDDr#   c                     t        d      )z;Optional[str]: An email address that identifies the signer.z!Signer email must be implemented.r=   r+   s    r"   signer_emailzSigning.signer_email  s    
 ""EFFr#   c                     t        d      )z8google.auth.crypt.Signer: The signer used to sign bytes.zSigner must be implemented.r=   r+   s    r"   signerzSigning.signer  s    
 ""?@@r#   N)
rY   rZ   r[   r\   r^   r_   r   r   r   r   r9   r#   r"   r   r     sW    ME E 	G G 	A Ar#   r   c                       e Zd ZdZdZdZdZy)r.   aJ  
    Tracks the state of a token.
    FRESH: The token is valid. It is not expired or close to expired, or the token has no expiry.
    STALE: The token is close to expired, and should be refreshed. The token can be used normally.
    INVALID: The token is expired or invalid. The token cannot be used for a normal operation.
       r      N)rY   rZ   r[   r\   r0   r1   r/   r9   r#   r"   r.   r.     s     EEGr#   r.   c                   N     e Zd ZdZ fdZej                  d        ZddZ xZ	S )CredentialsWithTrustBoundaryzAbstract base for credentials supporting legacy trust boundary configuration.

    .. deprecated::
        Use :class:`~google.auth.credentials.CredentialsWithRegionalAccessBoundary` instead.
    c                 Z    t         |           t        j                  dt        d       y NzVCredentialsWithTrustBoundary is deprecated. Use CredentialsWithRegionalAccessBoundary.r   r   )r   r   r   r   r   r   s    r"   r   z%CredentialsWithTrustBoundary.__init__  s#    d	
r#   c                     t               )zIDeprecated: Implement _build_regional_access_boundary_lookup_url instead.r=   r+   s    r"    _build_trust_boundary_lookup_urlz=CredentialsWithTrustBoundary._build_trust_boundary_lookup_url  s     "##r#   c                 Z    t        j                  dt        d       | j                         S r   )r   r   r   r   r?   s     r"   r   zGCredentialsWithTrustBoundary._build_regional_access_boundary_lookup_url  s(    d	

 4466r#   rJ   )
rY   rZ   r[   r\   r   r^   r_   r   r   r`   ra   s   @r"   r   r     s,    
 	$ $7r#   r   rJ   ).r\   r^   enumr   loggingrg   typingr   r   r   r   urllib.parser   r   google.authr	   r
   r   r   r   google.auth._credentials_baser   google.auth._refresh_workerr   google.auth.transportgoogler   r   str__annotations__&NO_OP_TRUST_BOUNDARY_ENCODED_LOCATIONS	getLoggerr   r   rc   rn   rs   rw   r   ABCMetar   r   r   r   r.   r   r9   r#   r"   <module>r      s    " 
   	 6 6 !  3 7 "  : < *  -/ S	 .). &
'

2
3G." G.T+ ,Mk M
K 
"h
K h
V"?; "?J@Bs{{ @BF*J^ *JZ8A A@
 
7#H 7r#   