ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ [c@sdZddlZddlZddlZddlZddlZddlZddlmZddl m Z m Z m Z ddl mZddlmZddlmZd Zd Zd Zd efd YZdefdYZdefdYZdefdYZdS(s] requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. iN(t b64encodei(turlparsetstrt basestring(textract_cookies_to_jar(tto_native_string(tparse_dict_headers!application/x-www-form-urlencodedsmultipart/form-datacCst|ts:tjdj|dtt|}nt|tsttjdj|dtt|}nt|tr|jd}nt|tr|jd}ndtt dj ||fj }|S(sReturns a Basic Auth string.sNon-string usernames will no longer be supported in Requests 3.0.0. Please convert the object you've passed in ({!r}) to a string or bytes object in the near future to avoid problems.tcategorysNon-string passwords will no longer be supported in Requests 3.0.0. Please convert the object you've passed in ({!r}) to a string or bytes object in the near future to avoid problems.tlatin1sBasic t:( t isinstanceRtwarningstwarntformattDeprecationWarningRtencodeRRtjointstrip(tusernametpasswordtauthstr((s1/usr/lib/python2.7/site-packages/requests/auth.pyt_basic_auth_strs&   %tAuthBasecBseZdZdZRS(s4Base class that all auth implementations derive fromcCstddS(NsAuth hooks must be callable.(tNotImplementedError(tselftr((s1/usr/lib/python2.7/site-packages/requests/auth.pyt__call__Ks(t__name__t __module__t__doc__R(((s1/usr/lib/python2.7/site-packages/requests/auth.pyRHst HTTPBasicAuthcBs2eZdZdZdZdZdZRS(s?Attaches HTTP Basic Authentication to the given Request object.cCs||_||_dS(N(RR(RRR((s1/usr/lib/python2.7/site-packages/requests/auth.pyt__init__Rs cCs:t|jt|ddk|jt|ddkgS(NRR(tallRtgetattrtNoneR(Rtother((s1/usr/lib/python2.7/site-packages/requests/auth.pyt__eq__VscCs ||k S(N((RR#((s1/usr/lib/python2.7/site-packages/requests/auth.pyt__ne__\scCs t|j|j|jd<|S(Nt Authorization(RRRtheaders(RR((s1/usr/lib/python2.7/site-packages/requests/auth.pyR_s(RRRRR$R%R(((s1/usr/lib/python2.7/site-packages/requests/auth.pyROs    t HTTPProxyAuthcBseZdZdZRS(s=Attaches HTTP Proxy Authentication to a given Request object.cCs t|j|j|jd<|S(NsProxy-Authorization(RRRR'(RR((s1/usr/lib/python2.7/site-packages/requests/auth.pyRgs(RRRR(((s1/usr/lib/python2.7/site-packages/requests/auth.pyR(dstHTTPDigestAuthcBsVeZdZdZdZdZdZdZdZdZ dZ RS( s@Attaches HTTP Digest Authentication to the given Request object.cCs%||_||_tj|_dS(N(RRt threadingtlocalt _thread_local(RRR((s1/usr/lib/python2.7/site-packages/requests/auth.pyRos  cCsat|jds]t|j_d|j_d|j_i|j_d|j_d|j_ ndS(Ntinitti( thasattrR,tTrueR-t last_noncet nonce_counttchalR"tpost num_401_calls(R((s1/usr/lib/python2.7/site-packages/requests/auth.pytinit_per_thread_stateus     cs|jjd}|jjd}|jjjd}|jjjd}|jjjd}d"|d"krzd}n |j}|dks|dkrd} | nZ|d krd } | n<|d krd } | n|d kr d} | nfd} d"kr)d"Sd"}t|}|jpGd}|jrg|d|j7}nd|j||j f}d||f}|}|}||jj kr|jj d7_ n d|j_ d|jj }t |jj j d}||j d7}|tjj d7}|tjd7}tj|jd }|dkrd|||f}n|s| |d||f}nP|dksd|jdkrd|||d|f}| ||}nd"S||j_ d|j||||f}|r7|d|7}n|rN|d|7}n|re|d|7}n|r|d ||f7}nd!|S(#s :rtype: str trealmtnoncetqopt algorithmtopaquetMD5sMD5-SESScSs4t|tr!|jd}ntj|jS(Nsutf-8(R RRthashlibtmd5t hexdigest(tx((s1/usr/lib/python2.7/site-packages/requests/auth.pytmd5_utf8stSHAcSs4t|tr!|jd}ntj|jS(Nsutf-8(R RRR=tsha1R?(R@((s1/usr/lib/python2.7/site-packages/requests/auth.pytsha_utf8ssSHA-256cSs4t|tr!|jd}ntj|jS(Nsutf-8(R RRR=tsha256R?(R@((s1/usr/lib/python2.7/site-packages/requests/auth.pyt sha256_utf8ssSHA-512cSs4t|tr!|jd}ntj|jS(Nsutf-8(R RRR=tsha512R?(R@((s1/usr/lib/python2.7/site-packages/requests/auth.pyt sha512_utf8scsd||fS(Ns%s:%s((tstd(t hash_utf8(s1/usr/lib/python2.7/site-packages/requests/auth.pytR.t/t?s%s:%s:%ss%s:%sis%08xsutf-8iitautht,s%s:%s:%s:%s:%ss>username="%s", realm="%s", nonce="%s", uri="%s", response="%s"s , opaque="%s"s, algorithm="%s"s , digest="%s"s , qop="auth", nc=%s, cnonce="%s"s Digest %sN(R,R3tgetR"tupperRtpathtqueryRRR1R2RRttimetctimetosturandomR=RCR?tsplit(RtmethodturlR7R8R9R:R;t _algorithmRARDRFRHtKDtentdigtp_parsedRStA1tA2tHA1tHA2tncvalueRItcnoncetrespdigtnoncebittbase((RKs1/usr/lib/python2.7/site-packages/requests/auth.pytbuild_digest_headers~                     ! cKs|jrd|j_ndS(s)Reset num_401_calls counter on redirects.iN(t is_redirectR,R5(RRtkwargs((s1/usr/lib/python2.7/site-packages/requests/auth.pythandle_redirects cKsd|jkodkns/d|j_|S|jjd k r]|jjj|jjn|jj dd}d|j kr~|jjdkr~|jjd7_t j dd t j }t|jd|d d|j_|j|j|jj}t|j|j|j|j|j|j|j|j|jd <|jj||}|jj|||_|Sd|j_|S( so Takes the given response and tries digest-auth, if needed. :rtype: requests.Response iiiswww-authenticateR.tdigestisdigest tflagstcountR&N(t status_codeR,R5R4R"trequesttbodytseekR'RQtlowertretcompilet IGNORECASERtsubR3tcontenttclosetcopyRt_cookiestrawtprepare_cookiesRiRZR[t connectiontsendthistorytappend(RRRkts_authtpattprept_r((s1/usr/lib/python2.7/site-packages/requests/auth.pyt handle_401s.  $$   cCs|j|jjr8|j|j|j|jds$       ,