Ë
    Í—Äjl  ã                   óP   — d dl Z d dlmZmZmZ ddlmZmZ ddlm	Z	  G d„ d«      Z
y)é    N)ÚAnyÚOptionalÚUnioné   )ÚPyJWKSetÚPyJWTSetWithTimestamp)ÚPyJWKSetErrorc                   ód   — e Zd Zdeddfd„Zdeeeee	e
f   f      ddfd„Zdee   fd„Zdefd„Zy)	ÚJWKSetCacheÚlifespanÚreturnNc                 ó    — d | _         || _        y ©N)Újwk_set_with_timestampr   )Úselfr   s     úVC:\Users\pivot\Documents\cueki\casual-preloader\Lib\site-packages\jwt/jwk_set_cache.pyÚ__init__zJWKSetCache.__init__	   s   € ØGKˆÔ#Ø ˆ�ó    Újwk_setc                 ó¸   — |€d| _         yt        |t        «      s0t        |t        «      st	        d«      ‚t        j
                  |«      }t        |«      | _         y)a  Cache *jwk_set*, or clear the cache when it is ``None``.

        Accepts either an already-parsed ``PyJWKSet`` or the raw JWKS
        payload it is parsed from, and always stores it parsed so that
        reads never have to parse the keys again.

        :raises PyJWKSetError: If *jwk_set* is neither a ``PyJWKSet`` nor a
            JWKS payload containing usable keys.
        NzInvalid JWK Set value)r   Ú
isinstancer   Údictr	   Ú	from_dictr   )r   r   s     r   ÚputzJWKSetCache.put   sQ   € ð ˆ?à*.ˆDÔ'Øä˜'¤8Ô,Ü˜g¤tÔ,Ü#Ð$;Ó<Ð<Ü×(Ñ(¨Ó1ˆGä&;¸GÓ&DˆÕ#r   c                 óp   — | j                   �| j                  «       ry | j                   j                  «       S r   )r   Ú
is_expiredÚget_jwk_set©r   s    r   ÚgetzJWKSetCache.get#   s/   € Ø×&Ñ&Ð.°$·/±/Ô2CØà×*Ñ*×6Ñ6Ó8Ð8r   c                 ó¼   — | j                   d uxrM | j                  dkD  xr< t        j                  «       | j                   j	                  «       | j                  z   kD  S )Néÿÿÿÿ)r   r   ÚtimeÚ	monotonicÚget_timestampr   s    r   r   zJWKSetCache.is_expired)   sX   € à×'Ñ'¨tÐ3ò JØ—‘ Ñ"òJä—‘Ó Ø×)Ñ)×7Ñ7Ó9¸D¿M¹MÑIñJð	
r   )Ú__name__Ú
__module__Ú__qualname__Úfloatr   r   r   r   r   Ústrr   r   r   Úboolr   © r   r   r   r      s_   „ ð! ð !¨4ó !ðE˜8 E¨(°D¸¸c¸±NÐ*BÑ$CÑDð EÈó Eð,9�X˜hÑ'ó 9ð
˜Dô 
r   r   )r"   Útypingr   r   r   Úapi_jwkr   r   Ú
exceptionsr	   r   r+   r   r   Ú<module>r/      s   ðÛ ß 'Ñ 'ç 4Ý %÷'
ò '
r   