
    (phxy                     p   S r  SSKJr  SSKrSSKrSSKrSSKrSSK	r	SSK
Jr  SSK
Jr  SSK
Jr  SSK
Jr  SSKr SSKJr  S	rS
rS\R*                  0r\" S/5      r\b  \R2                  \S'   SS jrS rS rS rSS jrSS jr " S S\R@                  RB                  RD                  \R@                  RB                  RF                  5      r$ " S S\R@                  RB                  RD                  \R@                  RB                  RF                  5      r%g! \ a
    SSKJr   GNf = f! \ a    Sr Nf = f)a  JSON Web Tokens

Provides support for creating (encoding) and verifying (decoding) JWTs,
especially JWTs generated and consumed by Google infrastructure.

See `rfc7519`_ for more details on JWTs.

To encode a JWT use :func:`encode`::

    from google.auth import crypt
    from google.auth import jwt

    signer = crypt.Signer(private_key)
    payload = {'some': 'payload'}
    encoded = jwt.encode(signer, payload)

To decode a JWT and verify claims use :func:`decode`::

    claims = jwt.decode(encoded, certs=public_certs)

You can also skip verification::

    claims = jwt.decode(encoded, verify=False)

.. _rfc7519: https://tools.ietf.org/html/rfc7519

    )MappingN)_helpers)_service_account_info)crypt)
exceptions)es256i  
   RS256ES256c                    Uc  0 nUc  U R                   nUR                  SS05        SU;  aM  [        b3  [        U [        R                  5      (       a  UR                  SS05        OUR                  SS05        Ub  X2S'   [
        R                  " [        R                  " U5      R                  S5      5      [
        R                  " [        R                  " U5      R                  S5      5      /nSR                  U5      nU R                  U5      nUR                  [
        R                  " U5      5        SR                  U5      $ )	a  Make a signed JWT.

Args:
    signer (google.auth.crypt.Signer): The signer used to sign the JWT.
    payload (Mapping[str, str]): The JWT payload.
    header (Mapping[str, str]): Additional JWT header payload.
    key_id (str): The key id to add to the JWT header. If the
        signer has a key id it will be used as the default. If this is
        specified it will override the signer's key id.

Returns:
    bytes: The encoded JWT.
typJWTalgr   r
   kidutf-8   .)key_idupdater   
isinstanceES256Signerr   unpadded_urlsafe_b64encodejsondumpsencodejoinsignappend)signerpayloadheaderr   segmentssigning_input	signatures          B/var/www/html/venv/lib/python3.13/site-packages/google/auth/jwt.pyr   r   K   s    ~~
MM5%.!FFE4E4E!F!FMM5'*+MM5'*+u 	++DJJv,>,E,Eg,NO++DJJw,?,F,Fw,OPH
 IIh'MM*IOOH77	BC99X    c                     [         R                  " U 5      n [        R                  " UR	                  S5      5      $ ! [
         a,  n[        R                  " SR                  U5      5      nX2eSnAff = f)zDecodes a single JWT segment.r   zCan't parse segment: {0}N)	r   padded_urlsafe_b64decoder   loadsdecode
ValueErrorr   MalformedErrorformat)encoded_sectionsection_bytes
caught_excnew_excs       r$   _decode_jwt_segmentr1   v   sg    55oFM&zz-..w788 &++&--m<
 %	&s   $= 
A3'A..A3c                 "   [         R                  " U 5      n U R                  S5      S:w  a%  [        R                  " SR                  U 5      5      eU R                  S5      u  pnUS-   U-   n[         R                  " U5      n[        U5      n[        U5      n[        U[        5      (       d%  [        R                  " SR                  U5      5      e[        U[        5      (       d%  [        R                  " SR                  U5      5      eXVXC4$ )aW  Decodes a token and does no verification.

Args:
    token (Union[str, bytes]): The encoded JWT.

Returns:
    Tuple[Mapping, Mapping, str, str]: header, payload, signed_section, and
        signature.

Raises:
    google.auth.exceptions.MalformedError: if there are an incorrect amount of segments in the token or segments of the wrong type.
r      z&Wrong number of segments in token: {0}z+Header segment should be a JSON object: {0}z,Payload segment should be a JSON object: {0})r   to_bytescountr   r+   r,   splitr'   r1   r   r   )tokenencoded_headerencoded_payloadr#   signed_sectionr    r   s          r$   _unverified_decoder;      s     e$E{{4A''4;;EB
 	
 27T1B.NY#d*_<N11)<I !0F!/2Gfg&&''9@@P
 	
 gw'''':AA/R
 	
 N55r%   c                 &    [        U 5      u  n    nU$ )a   Return the decoded header of a token.

No verification is done. This is useful to extract the key id from
the header in order to acquire the appropriate certificate to verify
the token.

Args:
    token (Union[str, bytes]): the encoded JWT.

Returns:
    Mapping: The decoded JWT header.
)r;   )r7   r    _s      r$   decode_headerr>      s     )/OFAq!Mr%   c                    [         R                  " [         R                  " 5       5      nS H-  nX0;  d  M
  [        R                  " SR                  U5      5      e   U S   nXA-
  nX%:  a%  [        R                  " SR                  X$5      5      eU S   nXa-   nXr:  a%  [        R                  " SR                  Xr5      5      eg)a~  Verifies the ``iat`` (Issued At) and ``exp`` (Expires) claims in a token
payload.

Args:
    payload (Mapping[str, str]): The JWT payload.
    clock_skew_in_seconds (int): The clock skew used for `iat` and `exp`
        validation.

Raises:
    google.auth.exceptions.InvalidValue: if value validation failed.
    google.auth.exceptions.MalformedError: if schema validation failed.
)iatexpz(Token does not contain required claim {}r@   zQToken used too early, {} < {}. Check that your computer's clock is set correctly.rA   zToken expired, {} < {}N)r   datetime_to_secsutcnowr   r+   r,   InvalidValue)r   clock_skew_in_secondsnowkeyr@   earliestrA   latests           r$   _verify_iat_and_exprJ      s     
#
#HOO$5
6C ++:AA#F   %.C *H
~%%_ff
 	
 %.C (F|%%&>&E&Ef&RSS r%   c                 @   [        U 5      u  pVpxU(       d  U$ UR                  S5      n	UR                  S5      n
 [        U	   n[        U[        5      (       aH  U
(       a0  X;  a%  [
        R                  " SR                  U
5      5      eX   /nOUR                  5       nOUn[        R                  " XxX5      (       d  [
        R                  " S5      e[        Xd5        UbS  UR                  S5      n[        U[        5      (       a  U/nX;  a%  [
        R                  " S	R                  X5      5      eU$ ! [         a[  nU	[        ;   a&  [
        R                  " SR                  U	5      5      Ue[
        R                  " SR                  U	5      5      UeSnAff = f)
a9  Decode and verify a JWT.

Args:
    token (str): The encoded JWT.
    certs (Union[str, bytes, Mapping[str, Union[str, bytes]]]): The
        certificate used to validate the JWT signature. If bytes or string,
        it must the the public key certificate in PEM format. If a mapping,
        it must be a mapping of key IDs to public key certificates in PEM
        format. The mapping must contain the same key ID that's specified
        in the token's header.
    verify (bool): Whether to perform signature and claim validation.
        Verification is done by default.
    audience (str or list): The audience claim, 'aud', that this JWT should
        contain. Or a list of audience claims. If None then the JWT's 'aud'
        parameter is not verified.
    clock_skew_in_seconds (int): The clock skew used for `iat` and `exp`
        validation.

Returns:
    Mapping[str, str]: The deserialized JSON payload in the JWT.

Raises:
    google.auth.exceptions.InvalidValue: if value validation failed.
    google.auth.exceptions.MalformedError: if schema validation failed.
r   r   zGThe key algorithm {} requires the cryptography package to be installed.z"Unsupported signature algorithm {}Nz$Certificate for key id {} not found.z!Could not verify token signature.audz/Token has wrong audience {}, expected one of {})r;   get_ALGORITHM_TO_VERIFIER_CLASSKeyError_CRYPTOGRAPHY_BASED_ALGORITHMSr   rD   r,   r   r   r+   valuesr   verify_signaturerJ   str)r7   certsverifyaudiencerE   r    r   r:   r#   key_algr   verifier_clsexccerts_to_checkclaim_audiences                  r$   r)   r)      s   4 2DE1J.F^ jjGZZF3G< %!!" //:AA&I  $m_N #\\^N !!>  ''(KLL 7  U+h$$ zH)))AHH"  N_  
44))Y`` 	 ))4;;GD
s   	D8 8
FAFFc                   b  ^  \ rS rSrSrS\S4U 4S jjr\S 5       r\S 5       r	\S 5       r
\S 5       r SS	 jr\R                  " \R                   R"                  R$                  5      S
 5       rS rS r\R                  " \R                   R"                  R,                  5      S 5       r\\R                  " \R                   R"                  R,                  5      S 5       5       r\\R                  " \R                   R"                  R,                  5      S 5       5       r\S 5       rSrU =r$ )Credentialsi?  a  Credentials that use a JWT as the bearer token.

These credentials require an "audience" claim. This claim identifies the
intended recipient of the bearer token.

The constructor arguments determine the claims for the JWT that is
sent with requests. Usually, you'll construct these credentials with
one of the helper constructors as shown in the next section.

To create JWT credentials using a Google service account private key
JSON file::

    audience = 'https://pubsub.googleapis.com/google.pubsub.v1.Publisher'
    credentials = jwt.Credentials.from_service_account_file(
        'service-account.json',
        audience=audience)

If you already have the service account file loaded and parsed::

    service_account_info = json.load(open('service_account.json'))
    credentials = jwt.Credentials.from_service_account_info(
        service_account_info,
        audience=audience)

Both helper methods pass on arguments to the constructor, so you can
specify the JWT claims::

    credentials = jwt.Credentials.from_service_account_file(
        'service-account.json',
        audience=audience,
        additional_claims={'meta': 'data'})

You can also construct the credentials directly if you have a
:class:`~google.auth.crypt.Signer` instance::

    credentials = jwt.Credentials(
        signer,
        issuer='your-issuer',
        subject='your-subject',
        audience=audience)

The claims are considered immutable. If you want to modify the claims,
you can easily create another instance using :meth:`with_claims`::

    new_audience = (
        'https://pubsub.googleapis.com/google.pubsub.v1.Subscriber')
    new_credentials = credentials.with_claims(audience=new_audience)
Nc                    > [         [        U ]  5         Xl        X l        X0l        X@l        X`l        Xpl        Uc  0 nXPl	        g)a  
Args:
    signer (google.auth.crypt.Signer): The signer used to sign JWTs.
    issuer (str): The `iss` claim.
    subject (str): The `sub` claim.
    audience (str): the `aud` claim. The intended audience for the
        credentials.
    additional_claims (Mapping[str, str]): Any additional claims for
        the JWT payload.
    token_lifetime (int): The amount of time in seconds for
        which the token is valid. Defaults to 1 hour.
    quota_project_id (Optional[str]): The project ID used for quota
        and billing.
N)
superr]   __init___signer_issuer_subject	_audience_token_lifetime_quota_project_id_additional_claims)	selfr   issuersubjectrV   additional_claimstoken_lifetimequota_project_id	__class__s	           r$   r`   Credentials.__init__s  sD    0 	k4)+!-!1$ ""3r%   c                 h    UR                  SUS   5        UR                  SUS   5        U " U40 UD6$ )a  Creates a Credentials instance from a signer and service account
info.

Args:
    signer (google.auth.crypt.Signer): The signer used to sign JWTs.
    info (Mapping[str, str]): The service account info.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    google.auth.jwt.Credentials: The constructed credentials.

Raises:
    google.auth.exceptions.MalformedError: If the info is not in the expected format.
rj   client_emailri   
setdefaultclsr   infokwargss       r$   _from_signer_and_info!Credentials._from_signer_and_info  >      	)T.%9:(D$896$V$$r%   c                 T    [         R                  " US/S9nU R                  " X140 UD6$ )ao  Creates an Credentials instance from a dictionary.

Args:
    info (Mapping[str, str]): The service account info in Google
        format.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    google.auth.jwt.Credentials: The constructed credentials.

Raises:
    google.auth.exceptions.MalformedError: If the info is not in the expected format.
rq   requirer   	from_dictrx   ru   rv   rw   r   s       r$   from_service_account_info%Credentials.from_service_account_info  /     '00?OP((@@@r%   c                 X    [         R                  " US/S9u  p4U R                  " XC40 UD6$ )a  Creates a Credentials instance from a service account .json file
in Google format.

Args:
    filename (str): The path to the service account .json file.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    google.auth.jwt.Credentials: The constructed credentials.
rq   r|   r   from_filenamerx   ru   filenamerw   rv   r   s        r$   from_service_account_file%Credentials.from_service_account_file  6     -::~.
 ((@@@r%   c                     UR                  SUR                  5        UR                  SUR                  5        U " UR                  4SU0UD6$ )a  Creates a new :class:`google.auth.jwt.Credentials` instance from an
existing :class:`google.auth.credentials.Signing` instance.

The new instance will use the same signer as the existing instance and
will use the existing instance's signer email as the issuer and
subject by default.

Example::

    svc_creds = service_account.Credentials.from_service_account_file(
        'service_account.json')
    audience = (
        'https://pubsub.googleapis.com/google.pubsub.v1.Publisher')
    jwt_creds = jwt.Credentials.from_signing_credentials(
        svc_creds, audience=audience)

Args:
    credentials (google.auth.credentials.Signing): The credentials to
        use to construct the new credentials.
    audience (str): the `aud` claim. The intended audience for the
        credentials.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    google.auth.jwt.Credentials: A new Credentials instance.
ri   rj   rV   rs   signer_emailr   )ru   credentialsrV   rw   s       r$   from_signing_credentials$Credentials.from_signing_credentials  sK    8 	(K$<$<=)[%=%=>;%%CCFCCr%   c           	          [         R                  " U R                  5      nUR                  U=(       d    0 5        U R	                  U R
                  Ub  UOU R                  Ub  UOU R                  Ub  UOU R                  UU R                  S9$ )aO  Returns a copy of these credentials with modified claims.

Args:
    issuer (str): The `iss` claim. If unspecified the current issuer
        claim will be used.
    subject (str): The `sub` claim. If unspecified the current subject
        claim will be used.
    audience (str): the `aud` claim. If unspecified the current
        audience claim will be used.
    additional_claims (Mapping[str, str]): Any additional claims for
        the JWT payload. This will be merged with the current
        additional claims.

Returns:
    google.auth.jwt.Credentials: A new credentials instance.
ri   rj   rV   rk   rm   )
copydeepcopyrg   r   rn   ra   rb   rc   rd   rf   )rh   ri   rj   rV   rk   new_additional_claimss         r$   with_claimsCredentials.with_claims  s    & !%d.E.E F$$%6%<"=~~LL#/6T\\&2G!)!5X4>>3!33  
 	
r%   c           	          U R                  U R                  U R                  U R                  U R                  U R
                  US9$ )Nr   )rn   ra   rb   rc   rd   rg   rh   rm   s     r$   with_quota_projectCredentials.with_quota_project  s@    ~~LL<<MM^^"55-  
 	
r%   c                    [         R                  " 5       n[        R                  " U R                  S9nX-   nU R
                  U R                  [         R                  " U5      [         R                  " U5      S.nU R                  (       a  U R                  US'   UR                  U R                  5        [        U R                  U5      nXS4$ )z]Make a signed JWT.

Returns:
    Tuple[bytes, datetime]: The encoded JWT and the expiration.
seconds)isssubr@   rA   rL   )r   rC   datetime	timedeltare   rb   rc   rB   rd   r   rg   r   ra   )rh   rF   lifetimeexpiryr   jwts         r$   	_make_jwtCredentials._make_jwt  s     oo%%d.B.BC <<==,,S1,,V4	
 >>!^^GENt../T\\7+{r%   c                 >    U R                  5       u  U l        U l        g)z>Refreshes the access token.

Args:
    request (Any): Unused.
N)r   r7   r   rh   requests     r$   refreshCredentials.refresh2  s     #'.."2
DKr%   c                 8    U R                   R                  U5      $ Nra   r   rh   messages     r$   
sign_bytesCredentials.sign_bytes<      ||  ))r%   c                     U R                   $ r   rb   rh   s    r$   r   Credentials.signer_email@       ||r%   c                     U R                   $ r   ra   r   s    r$   r   Credentials.signerE  r   r%   c                     U R                   $ )z2Additional claims the JWT object was created with.)rg   r   s    r$   rk   Credentials.additional_claimsJ  s     &&&r%   )	rg   rd   rb   rf   ra   rc   re   r   r7   )NNNN)__name__
__module____qualname____firstlineno____doc___DEFAULT_TOKEN_LIFETIME_SECSr`   classmethodrx   r   r   r   r   r   copy_docstringgoogleauthr   CredentialsWithQuotaProjectr   r   r   Signingr   propertyr   r   rk   __static_attributes____classcell__rn   s   @r$   r]   r]   ?  sh   /n 3#4J % %& A A" A A  D D@ KO
> V[[44PPQ
 R
23 V[[44<<=* >* V[[44<<= >  V[[44<<= >  ' 'r%   r]   c                   n  ^  \ rS rSrSrS\\S4U 4S jjr\S 5       r	\S 5       r
\S 5       r\S 5       rSS	 jr\R                  " \R"                  R$                  R&                  5      S
 5       r\S 5       rS rS rS rS r\R                  " \R"                  R$                  R6                  5      S 5       r\\R                  " \R"                  R$                  R6                  5      S 5       5       r\\R                  " \R"                  R$                  R6                  5      S 5       5       rSrU =r $ )OnDemandCredentialsiP  a  On-demand JWT credentials.

Like :class:`Credentials`, this class uses a JWT as the bearer token for
authentication. However, this class does not require the audience at
construction time. Instead, it will generate a new token on-demand for
each request using the request URI as the audience. It caches tokens
so that multiple requests to the same URI do not incur the overhead
of generating a new token every time.

This behavior is especially useful for `gRPC`_ clients. A gRPC service may
have multiple audience and gRPC clients may not know all of the audiences
required for accessing a particular service. With these credentials,
no knowledge of the audiences is required ahead of time.

.. _grpc: http://www.grpc.io/
Nc                    > [         [        U ]  5         Xl        X l        X0l        XPl        Xpl        Uc  0 nX@l        [        R                  " US9U l        g)aH  
Args:
    signer (google.auth.crypt.Signer): The signer used to sign JWTs.
    issuer (str): The `iss` claim.
    subject (str): The `sub` claim.
    additional_claims (Mapping[str, str]): Any additional claims for
        the JWT payload.
    token_lifetime (int): The amount of time in seconds for
        which the token is valid. Defaults to 1 hour.
    max_cache_size (int): The maximum number of JWT tokens to keep in
        cache. Tokens are cached using :class:`cachetools.LRUCache`.
    quota_project_id (Optional[str]): The project ID used for quota
        and billing.

N)maxsize)r_   r   r`   ra   rb   rc   re   rf   rg   
cachetoolsLRUCache_cache)	rh   r   ri   rj   rk   rl   max_cache_sizerm   rn   s	           r$   r`   OnDemandCredentials.__init__d  sR    2 	!413-!1$ ""3 )).Ar%   c                 h    UR                  SUS   5        UR                  SUS   5        U " U40 UD6$ )a  Creates an OnDemandCredentials instance from a signer and service
account info.

Args:
    signer (google.auth.crypt.Signer): The signer used to sign JWTs.
    info (Mapping[str, str]): The service account info.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    google.auth.jwt.OnDemandCredentials: The constructed credentials.

Raises:
    google.auth.exceptions.MalformedError: If the info is not in the expected format.
rj   rq   ri   rr   rt   s       r$   rx   )OnDemandCredentials._from_signer_and_info  rz   r%   c                 T    [         R                  " US/S9nU R                  " X140 UD6$ )a  Creates an OnDemandCredentials instance from a dictionary.

Args:
    info (Mapping[str, str]): The service account info in Google
        format.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    google.auth.jwt.OnDemandCredentials: The constructed credentials.

Raises:
    google.auth.exceptions.MalformedError: If the info is not in the expected format.
rq   r|   r~   r   s       r$   r   -OnDemandCredentials.from_service_account_info  r   r%   c                 X    [         R                  " US/S9u  p4U R                  " XC40 UD6$ )a0  Creates an OnDemandCredentials instance from a service account .json
file in Google format.

Args:
    filename (str): The path to the service account .json file.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    google.auth.jwt.OnDemandCredentials: The constructed credentials.
rq   r|   r   r   s        r$   r   -OnDemandCredentials.from_service_account_file  r   r%   c                     UR                  SUR                  5        UR                  SUR                  5        U " UR                  40 UD6$ )a  Creates a new :class:`google.auth.jwt.OnDemandCredentials` instance
from an existing :class:`google.auth.credentials.Signing` instance.

The new instance will use the same signer as the existing instance and
will use the existing instance's signer email as the issuer and
subject by default.

Example::

    svc_creds = service_account.Credentials.from_service_account_file(
        'service_account.json')
    jwt_creds = jwt.OnDemandCredentials.from_signing_credentials(
        svc_creds)

Args:
    credentials (google.auth.credentials.Signing): The credentials to
        use to construct the new credentials.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    google.auth.jwt.Credentials: A new Credentials instance.
ri   rj   r   )ru   r   rw   s      r$   r   ,OnDemandCredentials.from_signing_credentials  sF    0 	(K$<$<=)[%=%=>;%%000r%   c           	      *   [         R                  " U R                  5      nUR                  U=(       d    0 5        U R	                  U R
                  Ub  UOU R                  Ub  UOU R                  UU R                  R                  U R                  S9$ )a  Returns a copy of these credentials with modified claims.

Args:
    issuer (str): The `iss` claim. If unspecified the current issuer
        claim will be used.
    subject (str): The `sub` claim. If unspecified the current subject
        claim will be used.
    additional_claims (Mapping[str, str]): Any additional claims for
        the JWT payload. This will be merged with the current
        additional claims.

Returns:
    google.auth.jwt.OnDemandCredentials: A new credentials instance.
ri   rj   rk   r   rm   )r   r   rg   r   rn   ra   rb   rc   r   r   rf   )rh   ri   rj   rk   r   s        r$   r   OnDemandCredentials.with_claims  s     !%d.E.E F$$%6%<"=~~LL#/6T\\&2G3;;..!33  
 	
r%   c           	          U R                  U R                  U R                  U R                  U R                  U R
                  R                  US9$ )Nr   )rn   ra   rb   rc   rg   r   r   r   s     r$   r   &OnDemandCredentials.with_quota_project  sH     ~~LL<<MM"55;;..-  
 	
r%   c                     g)zsChecks the validity of the credentials.

These credentials are always valid because it generates tokens on
demand.
T r   s    r$   validOnDemandCredentials.valid  s     r%   c                 `   [         R                  " 5       n[        R                  " U R                  S9nX#-   nU R
                  U R                  [         R                  " U5      [         R                  " U5      US.nUR                  U R                  5        [        U R                  U5      nXd4$ )zMake a new JWT for the given audience.

Args:
    audience (str): The intended audience.

Returns:
    Tuple[bytes, datetime]: The encoded JWT and the expiration.
r   )r   r   r@   rA   rL   )r   rC   r   r   re   rb   rc   rB   r   rg   r   ra   )rh   rV   rF   r   r   r   r   s          r$   _make_jwt_for_audience*OnDemandCredentials._make_jwt_for_audience  s     oo%%d.B.BC <<==,,S1,,V4
 	t../T\\7+{r%   c                     U R                   R                  US5      u  p#Ub  U[        R                  " 5       :  a#  U R	                  U5      u  p#X#4U R                   U'   U$ )a  Get a JWT For a given audience.

If there is already an existing, non-expired token in the cache for
the audience, that token is used. Otherwise, a new token will be
created.

Args:
    audience (str): The intended audience.

Returns:
    bytes: The encoded JWT.
NN)r   rM   r   rC   r   )rh   rV   r7   r   s       r$   _get_jwt_for_audience)OnDemandCredentials._get_jwt_for_audience(  sT     ,?=FX__%66 77AME$)MDKK!r%   c                 .    [         R                  " S5      e)zRaises an exception, these credentials can not be directly
refreshed.

Args:
    request (Any): Unused.

Raises:
    google.auth.RefreshError
z2OnDemandCredentials can not be directly refreshed.)r   RefreshErrorr   s     r$   r   OnDemandCredentials.refresh=  s     %%@
 	
r%   c                    [         R                  R                  U5      n[         R                  R                  UR                  UR
                  UR                  SS45      nU R                  U5      nU R                  XGS9  g)a^  Performs credential-specific before request logic.

Args:
    request (Any): Unused. JWT credentials do not need to make an
        HTTP request to refresh.
    method (str): The request's HTTP method.
    url (str): The request's URI. This is used as the audience claim
        when generating the JWT.
    headers (Mapping): The request's headers.
 )r7   N)	urllibparseurlsplit
urlunsplitschemenetlocpathr   apply)rh   r   methodurlheaderspartsrV   r7   s           r$   before_request"OnDemandCredentials.before_requestM  sf     %%c*<<**\\5<<R<
 **84

7
(r%   c                 8    U R                   R                  U5      $ r   r   r   s     r$   r   OnDemandCredentials.sign_bytesb  r   r%   c                     U R                   $ r   r   r   s    r$   r    OnDemandCredentials.signer_emailf  r   r%   c                     U R                   $ r   r   r   s    r$   r   OnDemandCredentials.signerk  r   r%   )rg   r   rb   rf   ra   rc   re   )NNN)!r   r   r   r   r   r   _DEFAULT_MAX_CACHE_SIZEr`   r   rx   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r   r   r   s   @r$   r   r   P  sk   , 3.$BL % %& A A" A A  1 16
6 V[[44PPQ	
 R	
  6*
 )* V[[44<<=* >* V[[44<<= >  V[[44<<= > r%   r   r   )r   )NTNr   )&r   collections.abcr   ImportErrorcollectionsr   r   r   r   r   google.authr   r   r   r   google.auth.credentialsr   google.auth.cryptr   r   r
  RSAVerifierrN   	frozensetrP   ES256Verifierr   r1   r;   r>   rJ   r)   r   r   r   r   r]   r   r   r%   r$   <module>r     s1  8$'        -  " '  $   '):):; !*G9!5 ,1,?,? )(V	&&6R"(TVUpN'
KK##V[[%<%<%X%XN'b^
KK##V[[%<%<%X%X^E  $##$"  Es"   D D* D'&D'*D54D5