+
    ^eòjÃ  ã                   óÊ   € ^ RI t ^ RIt^ RIt^ RIt^ RIt]P
                  ! ]4      tR tR t	 ! R R]
4      t ! R R]
4      t ! R R	]4      t]t]t]P                   ]n        R# )
é    Nc                 ó:   €  V P                  R R7      #    T u # ; i)zutf-8)Úencoding)Úencode)Úraws   &Ú�/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/msal/oauth2cli/assertion.pyÚ
_str2bytesr      s$   € ðØ�z‰z 7ˆzÓ+Ð+øðØŠ
ús   ‚ ”c                 ór   € \         P                  ! \        P                  ! V 4      4      P	                  4       # ©N)Úbase64Úurlsafe_b64encodeÚbinasciiÚa2b_hexÚdecode)Ú
thumbprints   &r   Ú_encode_thumbprintr      s'   € Ü×#Ò#¤H×$4Ò$4°ZÓ$@ÓA×HÑHÓJÐJó    c                   ó4   a € ] tR t^t o RR ltRR ltRtV tR# )ÚAssertionCreatorNc                ó   € \        R4      h)a  Create an assertion in bytes, based on the provided claims.

All parameter names are defined in https://tools.ietf.org/html/rfc7521#section-5
except the expires_in is defined here as lifetime-in-seconds,
which will be automatically translated into expires_at in UTC.
z Will be implemented by sub-class)ÚNotImplementedError)	ÚselfÚaudienceÚissuerÚsubjectÚ
expires_atÚ
expires_inÚ	issued_atÚassertion_idÚkwargss	   &&&&&&&&,r   Úcreate_normal_assertionÚ(AssertionCreator.create_normal_assertion   s   € ô "Ð"DÓEÐEr   c                óR   a € \        WW4V3V 3R ll\        V^<,
          ^ 4      R7      # )z�Create an assertion as a callable,
which will then compute the assertion later when necessary.

This is a useful optimization to reuse the client assertion.
c                 ó0   <€ SP                   ! WV3R V/VB # ©r   )r    )ÚaÚiÚsÚer   r   s   &&&&&€r   Ú<lambda>Ú@AssertionCreator.create_regenerative_assertion.<locals>.<lambda>)   s   ø€ Ø×,Ò,¨Q°1ÑMÀÐMÀfÒMr   r$   )ÚAutoRefresherÚmax)r   r   r   r   r   r   s   f&&&&,r   Úcreate_regenerative_assertionÚ.AssertionCreator.create_regenerative_assertion!   s-   ø€ ô Ø¨7Èö Nä˜: b�=¨!Ó,ô.ð 	.r   © )NéX  NN)Nr0   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r    r-   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s   ø‡ € ô	F÷
.ò 
.r   r   c                   ó4   a € ] tR t^.t o RtRR ltR tRtV tR# )r+   zßCache the output of a factory, and auto-refresh it when necessary. Usage::

r = AutoRefresher(time.time, expires_in=5)
for i in range(15):
    print(r())  # the timestamp change only after every 5 seconds
    time.sleep(1)
c                ó,   € Wn         W n        / V n        R # r
   )Ú_factoryÚ_expires_inÚ_buf)r   Úfactoryr   s   &&&r   Ú__init__ÚAutoRefresher.__init__6   s   € ØŒØ%ÔØˆŽ	r   c                óP  € R Rr!\         P                   ! 4       pV P                  P                  V^ 4      V8:  d?   \        P	                  R4       W P                  4       WV P                  ,           /V n        M\        P	                  R4       V P                  P                  V4      # )r   ÚvaluezRegenerating new assertionzReusing still valid assertion)Útimer=   ÚgetÚloggerÚdebugr;   r<   )r   Ú
EXPIRES_ATÚVALUEÚnows   &   r   Ú__call__ÚAutoRefresher.__call__:   su   € Ø(¨'�EÜ�iŠi‹kˆØ�9‰9�=‰=˜ QÓ'¨3Ô.Ü�L‰LÐ5Ô6Ø§¡£°À4×CSÑCSÕ=SÐTˆD�Iä�L‰LÐ8Ô9Ø�y‰y�}‰}˜UÓ#Ð#r   )r=   r<   r;   N)i  )	r1   r2   r3   r4   Ú__doc__r?   rJ   r5   r6   r7   s   @r   r+   r+   .   s   ø‡ € ñô÷$ð $r   r+   c                   ó<   a € ] tR t^Et o RRR/R lltRR ltRtV tR# )ÚJwtAssertionCreatorNÚsha256_thumbprintc               óÄ   € Wn         W n        T;'       g    / V n        V'       d   \        V4      V P                  R&   V'       d   \        V4      V P                  R&   R# R# )aÎ  Construct a Jwt assertion creator.

Args:

    key (str):
        An unencrypted private key for signing, in a base64 encoded string.
        It can also be a cryptography ``PrivateKey`` object,
        which is how you can work with a previously-encrypted key.
        See also https://github.com/jpadilla/pyjwt/pull/525
    algorithm (str):
        "RS256", etc.. See https://pyjwt.readthedocs.io/en/latest/algorithms.html
        RSA and ECDSA algorithms require "pip install cryptography".
    sha1_thumbprint (str): The x5t aka X.509 certificate SHA-1 thumbprint.
    headers (dict): Additional headers, e.g. "kid" or "x5c" etc.
    sha256_thumbprint (str): The x5t#S256 aka X.509 certificate SHA-256 thumbprint.
zx5t#S256Úx5tN)ÚkeyÚ	algorithmÚheadersr   )r   rR   rS   Úsha1_thumbprintrT   rO   s   &&&&&$r   r?   ÚJwtAssertionCreator.__init__F   sM   € ð* ŒØ"ŒØ—}�} "ˆŒßÜ'9Ð:KÓ'LˆD�L‰L˜Ñ$ßÜ"4°_Ó"EˆD�L‰L˜Óñ r   c
                óh  € ^ RI p\        P                  ! 4       pRTRTRT;'       g    TRT;'       g	    WÅ,           RT;'       g    TRT;'       g    \        \        P                  ! 4       4      /pV'       d   W�R&   TP                  T	;'       g    / 4        VP                  WÐP                  V P                  V P                  R	7      p\        V4      #    T P                  P                  R
4      '       g"   T P                  P                  R4      '       d   \        P                  R4       h ; i)z¨Create a JWT Assertion.

Parameters are defined in https://tools.ietf.org/html/rfc7523#section-3
Key-value pairs in additional_claims will be added into payload as-is.
NÚaudÚissÚsubÚexpÚiatÚjtiÚnbf)rS   rT   ÚRSÚESz•Some algorithms requires "pip install cryptography". See https://pyjwt.readthedocs.io/en/latest/installation.html#cryptographic-dependencies-optional)ÚjwtrC   ÚstrÚuuidÚuuid4Úupdater   rR   rS   rT   r   Ú
startswithrE   Ú	exception)r   r   r   r   r   r   r   r   Ú
not_beforeÚadditional_claimsr   ra   rI   ÚpayloadÚstr_or_bytess   &&&&&&&&&&,    r   r    Ú+JwtAssertionCreator.create_normal_assertionc   s  € ó 	Ü�iŠi‹kˆà�8Ø�6Ø�7×$Ð$˜fØ�:×3Ð3 #Õ"2Ø�9×#Ð# Ø�<×4Ð4¤3¤t§z¢z£|Ó#4ðˆ÷ Ø'�E‰NØ�‰Ð(×.Ð.¨BÔ/ð		ØŸ:™:ØŸ™¨T¯^©^ÀTÇ\Á\ð &ó SˆLä˜lÓ+Ð+øð	Ø�~‰~×(Ñ(¨×.Ò.°$·.±.×2KÑ2KÈD×2QÒ2QÜ× Ñ ðwôxð ús   Â<C ÃAD1ÄD1)rS   rT   rR   )NN)NNr0   NNNN)r1   r2   r3   r4   r?   r    r5   r6   r7   s   @r   rN   rN   E   s    ø‡ € ñFð õF÷:ò r   rN   )rC   r   r   rc   ÚloggingÚ	getLoggerr1   rE   r   r   Úobjectr   r+   rN   ÚSignerÚ	JwtSignerr    Úsign_assertionr/   r   r   Ú<module>rs      sq   ðÛ Û Û Û Û ð 
×	Ò	˜8Ó	$€òòKô.�vô .ô2$�Fô $ô.=Ð*ô =ðB 
€Ø€	Ø.×FÑF€	Ö r   