+
    i8                    <   ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHtHt ^ RI	H	t	H
t
Ht ^ RIHtHt ^RIHt ^RIHtHtHtHtHtHtHtHtHt ^R	IHt ]'       d   ^R
IHtHt ^RIH t   ! R R4      t!]!! 4       t"]"PF                  t#]"PH                  t$]"PJ                  t%R# )    )annotationsN)timegm)IterableSequence)datetime	timedeltatimezone)TYPE_CHECKINGAny)api_jws)	DecodeErrorExpiredSignatureErrorImmatureSignatureErrorInvalidAudienceErrorInvalidIssuedAtErrorInvalidIssuerErrorInvalidJTIErrorInvalidSubjectErrorMissingRequiredClaimError)RemovedInPyjwt3Warning)AllowedPrivateKeysAllowedPublicKeys)PyJWKc                     ] tR t^tR%R R llt]R R l4       tR&R R lltR'R R	 lltR(R
 R llt	R R lt
R(R R lltR)R R lltR R ltR%R R lltR R ltR R ltR R ltR R ltRR/R  R! lltR" R# ltR$tR# )*PyJWTNc                    V ^8  d   QhRRRR/# )   optionsdict[str, Any] | NonereturnNone )formats   "-/usr/lib/python3/dist-packages/jwt/api_jwt.py__annotate__PyJWT.__annotate__   s     R R 5 R R    c                	D    Vf   / p/ V P                  4       CVCV n        R # N)_get_default_optionsr   )selfr   s   &&r$   __init__PyJWT.__init__   s&    ?G'Q$*C*C*E'Q'Qr'   c                   V ^8  d   QhRR/# )r   r    zdict[str, bool | list[str]]r"   )r#   s   "r$   r%   r&   $   s     
 
"= 
r'   c                 	*    R RRRRRRRRRRRRRRRR	. /	# )
verify_signatureT
verify_exp
verify_nbf
verify_iat
verify_aud
verify_iss
verify_sub
verify_jtirequirer"   r"   r'   r$   r*   PyJWT._get_default_options#   s;     $$$$$$$r

 
	
r'   c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r   payloaddict[str, Any]keyz(AllowedPrivateKeys | PyJWK | str | bytes	algorithm
str | Noneheadersr   json_encodertype[json.JSONEncoder] | Nonesort_headersboolr    strr"   )r#   s   "r$   r%   r&   1   sP     $
 $
$
 6$
 	$

 '$
 4$
 $
 
$
r'   c           	     	f   \        V\        4      '       g   \        R 4      hVP                  4       pR FK  p\        VP	                  V4      \
        4      '       g   K*  \        W,          P                  4       4      W&   KM  	  V P                  VVVR7      p\        P                  ! VVVVVVR7      # )zGExpecting a dict object, as JWT only supports JSON objects as payloads.)r@   rA   )rC   )expiatnbf)
isinstancedict	TypeErrorcopygetr   r   utctimetuple_encode_payloadr   encode)	r+   r;   r=   r>   r@   rA   rC   
time_claimjson_payloads	   &&&&&&&  r$   rQ   PyJWT.encode1   s     '4((,  ,,./J'++j18<<&,W-@-M-M-O&P# 0
 ++% , 
 ~~%
 	
r'   c               (    V ^8  d   QhRRRRRRRR/# )	r   r;   r<   r@   r   rA   rB   r    bytesr"   )r#   s   "r$   r%   r&   W   s2       ' 4	
 
r'   c                R    \         P                  ! VRVR7      P                  R4      # )z
Encode a given payload to the bytes to be signed.

This method is intended to be overridden by subclasses that need to
encode the payload in a different way, e.g. compress the payload.
)
separatorsclszutf-8),:)jsondumpsrQ   )r+   r;   r@   rA   s   &&&&r$   rP   PyJWT._encode_payloadW   s)     zz!
 &/		r'   c               H    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRR/# )r   jwtstr | bytesr=   'AllowedPublicKeys | PyJWK | str | bytes
algorithmsSequence[str] | Noner   r   verifybool | Nonedetached_payloadbytes | Noneaudiencestr | Iterable[str] | Noneissuerstr | Sequence[str] | Nonesubjectr?   leewayfloat | timedeltakwargsr   r    r<   r"   )r#   s   "r$   r%   r&   i   s     H HH 5H )	H
 'H H 'H -H +H H "H" #H$ 
%Hr'   c           	     	   V'       d8   \         P                  ! R \        VP                  4       4       2\        ^R7       \        T;'       g    / 4      pVP                  RR4       Ve+   WTR,          8w  d   \         P                  ! R\        ^R7       VR,          '       g   VP                  RR4       VP                  RR4       VP                  R	R4       VP                  R
R4       VP                  RR4       VP                  RR4       VP                  RR4       \        P                  ! VVVVVR7      pV P                  V4      p/ V P                  CVCpV P                  VVVVV
V	R7       WR&   V# )zypassing additional kwargs to decode_complete() is deprecated and will be removed in pyjwt version 3. Unsupported kwargs: 
stacklevelr0   TzThe `verify` argument to `decode` does nothing in PyJWT 2.0 and newer. The equivalent is setting `verify_signature` to False in the `options` dictionary. This invocation has a mismatch between the kwarg and the option entry.)categoryrs   r1   Fr2   r3   r4   r5   r6   r7   )r=   rc   r   rg   )ri   rk   rn   rm   r;   )warningswarntuplekeysr   rK   
setdefaultDeprecationWarningr   decode_complete_decode_payloadr   _validate_claims)r+   r`   r=   rc   r   re   rg   ri   rk   rm   rn   rp   decodedr;   merged_optionss   &&&&&&&&&&&,   r$   r{   PyJWT.decode_completei   s|   & MM'',V[[]';&<> ' w}}"%-t4
 &4F,G"GMMY , )**|U3|U3|U3|U3|U3|U3|U3))!-
 &&w/4DLL4G4 	 	
 %	r'   c                    V ^8  d   QhRRRR/# )r   r~   r<   r    r   r"   )r#   s   "r$   r%   r&      s      ~ # r'   c                     \         P                  ! VR,          4      p\	        T\
        4      '       g   \        R4      hT#   \         d   p\        RT 24      ThRp?ii ; i)z
Decode the payload from a JWS dictionary (payload, signature, header).

This method is intended to be overridden by subclasses that need to
decode the payload in a different way, e.g. decompress compressed
payloads.
r;   zInvalid payload string: Nz-Invalid payload string: must be a json object)r\   loads
ValueErrorr   rJ   rK   )r+   r~   r;   es   &&  r$   r|   PyJWT._decode_payload   sd    	Ejj!34G '4((MNN	  	E 8<=1D	Es   A A!AA!c               H    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRR/# )r   r`   ra   r=   rb   rc   rd   r   r   re   rf   rg   rh   ri   rj   rm   r?   rk   rl   rn   ro   rp   r   r    r"   )r#   s   "r$   r%   r&      s     '" '"'" 5'" )	'"
 ''" '" ''" -'" '" +'" "'"" #'"$ 
%'"r'   c                	    V'       d8   \         P                  ! R \        VP                  4       4       2\        ^R7       V P                  VVVVVVVVV	V
R7
      pVR,          # )zppassing additional kwargs to decode() is deprecated and will be removed in pyjwt version 3. Unsupported kwargs: rr   )re   rg   ri   rm   rk   rn   r;   )ru   rv   rw   rx   r   r{   )r+   r`   r=   rc   r   re   rg   ri   rm   rk   rn   rp   r~   s   &&&&&&&&&&&, r$   decodePyJWT.decode   sx    & MM'',V[[]';&<> ' &&- ' 
 y!!r'   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r;   r<   r   rm   r?   rn   ro   r    r!   r"   )r#   s   "r$   r%   r&      s<     (( ((((  (( (( "(( 
((r'   c                	H   \        V\        4      '       d   VP                  4       pVe(   \        V\        \        34      '       g   \        R4      hV P                  W4       \        P                  ! \        P                  R7      P                  4       pRV9   d"   VR,          '       d   V P                  WV4       RV9   d"   VR,          '       d   V P                  WV4       RV9   d"   VR,          '       d   V P                  WV4       VR	,          '       d   V P                  W4       VR
,          '       d$   V P!                  WVP#                  RR4      R7       VR,          '       d   V P%                  W4       VR,          '       d   V P'                  V4       R # R # )Nz+audience must be a string, iterable or None)tzrH   r3   rI   r2   rG   r1   r5   r4   
strict_audF)strictr6   r7   )rJ   r   total_secondsrE   r   rL   _validate_required_claimsr   nowr	   utc	timestamp_validate_iat_validate_nbf_validate_exp_validate_iss_validate_audrN   _validate_sub_validate_jti)r+   r;   r   ri   rk   rm   rn   r   s   &&&&&&& r$   r}   PyJWT._validate_claims   sP    fi(())+F
8c8_(M(MIJJ&&w8llhll+557G 5 5wV4G 5 5wV4G 5 5wV4<  w/<  '++lE*J   <  w0<  w' !r'   c               $    V ^8  d   QhRRRRRR/# )r   r;   r<   r   r    r!   r"   )r#   s   "r$   r%   r&     s(     7 77  7 
	7r'   c                	b    VR ,           F!  pVP                  V4      e   K  \        V4      h	  R# )r8   N)rN   r   )r+   r;   r   claims   &&& r$   r   PyJWT._validate_required_claims  s0    
 Y''E{{5!)/66 (r'   c                    V ^8  d   QhRRRR/# r   r;   r<   r    r!   r"   )r#   s   "r$   r%   r&     s     = =^ =d =r'   c                    RV9  d   R# \        VR,          \        4      '       g   \        R4      hVe$   VP                  R4      V8w  d   \        R4      hR# R# )z
Checks whether "sub" if in the payload is valid ot not.
This is an Optional claim

:param payload(dict): The payload which needs to be validated
:param subject(str): The subject of the token
subNzSubject must be a stringzInvalid subject)rJ   rE   r   rN   )r+   r;   rm   s   &&&r$   r   PyJWT._validate_sub  sY     '%.#..%&@AA{{5!W,)*;<< - r'   c                    V ^8  d   QhRRRR/# r   r"   )r#   s   "r$   r%   r&   2  s     = =^ = =r'   c                x    RV9  d   R# \        VP                  R4      \        4      '       g   \        R4      hR# )z
Checks whether "jti" if in the payload is valid ot not
This is an Optional claim

:param payload(dict): The payload which needs to be validated
jtiNzJWT ID must be a string)rJ   rN   rE   r   )r+   r;   s   &&r$   r   PyJWT._validate_jti2  s6     '++e,c22!";<< 3r'   c               (    V ^8  d   QhRRRRRRRR/# r   r;   r<   r   floatrn   r    r!   r"   )r#   s   "r$   r%   r&   @  s8     M MM M 	M
 
Mr'   c                	     \        VR ,          4      pYBT,           8  d   \        R4      hR#   \         d    \        R4      Rhi ; i)rH   z)Issued At claim (iat) must be an integer.Nz The token is not yet valid (iat))intr   r   r   )r+   r;   r   rn   rH   s   &&&& r$   r   PyJWT._validate_iat@  sV    	gen%C
 ,()KLL  	  	&;		   . Ac               (    V ^8  d   QhRRRRRRRR/# r   r"   )r#   s   "r$   r%   r&   O  s8     M MM M 	M
 
Mr'   c                	     \        VR ,          4      pYBT,           8  d   \        R4      hR#   \         d    \        R4      Rhi ; i)rI   z*Not Before claim (nbf) must be an integer.Nz The token is not yet valid (nbf))r   r   r   r   )r+   r;   r   rn   rI   s   &&&& r$   r   PyJWT._validate_nbfO  sU    	Vgen%C ,()KLL    	VJKQUU	Vr   c               (    V ^8  d   QhRRRRRRRR/# r   r"   )r#   s   "r$   r%   r&   ]  s8     A AA A 	A
 
Ar'   c                	     \        VR ,          4      pYBT,
          8:  d   \        R4      hR#   \         d    \        R4      Rhi ; i)rG   z/Expiration Time claim (exp) must be an integer.NzSignature has expired)r   r   r   r   )r+   r;   r   rn   rG   s   &&&& r$   r   PyJWT._validate_exp]  sV    	gen%C < '(?@@ !  	A	r   r   Fc               (    V ^8  d   QhRRRRRRRR/# )	r   r;   r<   ri   rj   r   rD   r    r!   r"   )r#   s   "r$   r%   r&   m  s8     0A 0A0A -0A
 0A 
0Ar'   c               	,  a Vf$   RV9  g   VR,          '       g   R # \        R4      hRV9  g   VR,          '       g   \        R4      hVR,          oV'       dW   \        V\        4      '       g   \        R4      h\        S\        4      '       g   \        R4      hVS8w  d   \        R4      hR # \        S\        4      '       d   S.o\        S\        4      '       g   \        R4      h\
        ;QJ d    R S 4       F  '       g   K   RM	  R	M! R S 4       4      '       d   \        R4      h\        V\        4      '       d   V.p\        ;QJ d    V3R
 lV 4       F  '       d   K   R	M	  RM! V3R
 lV 4       4      '       d   \        R4      hR # )NaudzInvalid audiencezInvalid audience (strict)z&Invalid claim format in token (strict)zAudience doesn't match (strict)zInvalid claim format in tokenc              3  L   "   T F  p\        V\        4      '       * x  K  	  R # 5ir)   )rJ   rE   ).0cs   & r$   	<genexpr>&PyJWT._validate_aud.<locals>.<genexpr>  s     ?!:a%%%s   "$TFc              3  ,   <"   T F	  qS9  x  K  	  R # 5ir)   r"   )r   r   audience_claimss   & r$   r   r     s     >Xc/)Xs   zAudience doesn't match)r   r   rJ   rE   listanyall)r+   r;   ri   r   r   s   &&&$@r$   r   PyJWT._validate_audm  sC    G#75>> ''9::wu~~ ,E22!%. h,,*+FGG os33*+STT?**+LMMos++./O/400&'FGG3??333????&'FGGh$$ zH3>X>333>X>>>&'?@@ ?r'   c               $    V ^8  d   QhRRRRRR/# )r   r;   r<   rk   r   r    r!   r"   )r#   s   "r$   r%   r&     s!     ; ;^ ;S ;T ;r'   c                	    Vf   R # RV9  d   \        R4      h\        V\        4      '       d   VR,          V8w  d   \        R4      hR # VR,          V9  d   \        R4      hR # )NisszInvalid issuer)r   rJ   rE   r   )r+   r;   rk   s   &&&r$   r   PyJWT._validate_iss  sf    >+E22fc""u~'()9:: ( u~V+()9:: ,r'   )r   r)   )NNNT)NN)	 NNNNNNNr   )NNNr   )__name__
__module____qualname____firstlineno__r,   staticmethodr*   rQ   rP   r{   r|   r   r}   r   r   r   r   r   r   r   r   __static_attributes__r"   r'   r$   r   r      s|    R
 
 
$
L$HT '"R((T7=&=MMA 0A
 0Ad; ;r'   r   )&
__future__r   r\   ru   calendarr   collections.abcr   r   r   r   r	   typingr
   r   r   r   
exceptionsr   r   r   r   r   r   r   r   r   r   rc   r   r   api_jwkr   r   _jwt_global_objrQ   r{   r   r"   r'   r$   <module>r      st    "    . 2 2 % 
 
 
 -AN; N;b '			!11			r'   