PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  ?Yc @s}ddlmZmZddlmZmZddlmZddlmZi de fd6de fd6d e fd 6d e fd 6d e fd6de fd6de fd6de fd6de fd6de fd6de fd6Z dddddd d!d"d#d$d%d&g Z d'e fd(YZd)e fd*YZd+e fd,YZd-efd.YZd/efd0YZd1S(2i(tbase64url_decodetbase64url_encode(t json_decodet json_encode(tJWA(tJWKt Algorithmtalgs JWK Set URLtjkus JSON Web KeytjwksKey IDtkids X.509 URLtx5usX.509 Certificate Chaintx5cs"X.509 Certificate SHA-1 Thumbprinttx5ts$X.509 Certificate SHA-256 Thumbprintsx5t#S256tTypettyps Content TypetctytCriticaltcrittHS256tHS384tHS512tRS256tRS384tRS512tES256tES384tES512tPS256tPS384tPS512tInvalidJWSSignaturecBseZdZdddZRS(s_Invalid JWS Signature. This exception is raised when a signature cannot be validated. cCsXd}|rt|}nd}|r>|dt|7}ntt|j|dS(Ns&Unknown Signature Verification Failures {%s}(tNonetstrtsuperRt__init__(tselftmessaget exceptiontmsg((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR#'sN(t__name__t __module__t__doc__R R#(((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR!stInvalidJWSObjectcBseZdZdddZRS(svInvalid JWS Object. This exception is raised when the JWS Object is invalid and/or improperly formatted. cCsTd}|r|d|7}n|r:|dt|7}ntt|j|dS(NsInvalid JWS Objects [%s]s {%s}(R!R"R+R#(R$R%R&R'((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR#9s N(R(R)R*R R#(((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR+2stInvalidJWSOperationcBseZdZdddZRS(sInvalid JWS Object. This exception is raised when a requested operation cannot be execute due to unsatisfied conditions. cCsRd}|r|}nd}|r8|dt|7}ntt|j|dS(NsUnknown Operation Failures {%s}(R R!R"R,R#(R$R%R&R'((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR#Is N(R(R)R*R R#(((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR,BstJWSCorecBs5eZdZddZdZdZdZRS(sThe inner JWS Core object. This object SHOULD NOT be used directly, the JWS object should be used instead as JWS perform necessary checks on the validity of the object and requested operations. cCs||_|j|||_t|ts<tdn||_|dk rt|trot |}nt |j d|_ n d|_ t ||_ dS(sCore JWS token handling. :param alg: The algorithm used to produce the signature. See RFC 7518 :param key: A (:class:`jwcrypto.jwk.JWK`) key of appropriate type for the "alg" provided in the 'protected' json string. :param header: A JSON string representing the protected header. :param payload(bytes): An arbitrary value :param algs: An optional list of allowed algorithms :raises ValueError: if the key is not a :class:`JWK` object :raises InvalidJWAAlgorithm: if the algorithm is not valid, is unknown or otherwise not yet implemented. skey is not a JWK objectsutf-8tN(Rt_jwatenginet isinstanceRt ValueErrortkeyR tdictRRtencodet protectedtpayload(R$RR3theaderR7talgs((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR#]s    cCs=|dkrt}n||kr0tdntj|S(NsAlgorithm not allowed(R tdefault_allowed_algsR,Rt signing_alg(R$tnametallowed((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR/zs    cCsadj|j|jgjd}|jj|j|}i|jd6|jd6t|d6S(sGenerates a signaturet.sutf-8R6R7t signature(tjoinR6R7R5R0tsignR3R(R$tsiginR?((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyRAs $  cCspyAdj|j|jgjd}|jj|j||Wn(tk rk}tdt |nXt S(s^Verifies a signature :raises InvalidJWSSignature: if the verification fails. R>sutf-8sVerification failed( R@R6R7R5R0tverifyR3t ExceptionRtreprtTrue(R$R?RBte((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyRCs $N(R(R)R*R R#R/RARC(((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR-Ts    tJWScBseZdZddZdZedZejdZedZ dZ ddZ ddZ ddd Z dddd Zed Zed Zed ZRS(sFJSON Web Signature object This object represent a JWS token. cCs8t|_|r"||jdisUnrecognized representationiiisInvalid formatN(R4RIRRR!RPtdecodeR`R2tsplittlenR+RDRERC( R$traw_jwsR3RRbtdjwststosR[R]RG((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyt deserializesJ            c Cs|jjdd s$tdnt}|rt|trQt|}nt|}d|kr|j|dqn|rt|trt|}nt|}|j ||}nd|kr |d kr|d}q ||dkr t dq n|d kr't dnt ||||jd}|j }t} t |d| d<|r|| dR7R8iN( RIR,RRSRTRR@RPR`ReR(R$tcompactR6RaRmRbRh((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyt serializesN           cCsAd|jkrtdn|js6tdn|jdS(NR7sPayload not availablesPayload not verified(RIR,RU(R$((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyR7s  cCs|j}d|krtt}d|krOt|d}|j||}n|j||jdt}|Sd|jkr t}xz|dD]n}t}d|krt|d}|j||}n|j||jdt}|j|qW|StddS(NR?R6R8R_sJOSE Header(s) not available(RIR4RRZRSRPR`R,(R$RatjhR[tjhlRb((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyt jose_headers&    !   !N(R(R)R*R R#RNtpropertyROtsetterRURZR^RCRjRoRTRqR7Rt(((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyRHs    " +<K 8N(tjwcrypto.commonRRRRt jwcrypto.jwaRt jwcrypto.jwkRRFRTRLR:RDRR+R,tobjectR-RH(((s0/usr/lib/python2.7/site-packages/jwcrypto/jws.pyts0            B