HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyo

ӵ Yc@sodZddlmZddlmZddlmZmZdejfdYZ	de	fd	YZ
d
S(s-The module containing the code for GuessAuth.i(tauth(tcookiesi(t_digest_auth_compatthttp_proxy_digestt	GuessAuthcBs;eZdZdZdZdZdZdZRS(s7Guesses the auth type by the WWW-Authentication header.cCs(||_||_d|_d|_dS(N(tusernametpasswordtNoneRtpos(tselfRR((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt__init__s			cCs|jdk	r(|jjj|jn|j|jj|jj}t	|dslt
j|_nt
j
|j|j|j|j|jtj|j|j|_|j|}|jj||}|jj|||_|S(Nt_cookies(RRtrequesttbodytseektcontenttrawtrelease_conntcopythasattrRtRequestsCookieJarRtextract_cookies_to_jartprepare_cookiesRt
HTTPBasicAuthRRt
connectiontsendthistorytappend(R	trtkwargstprept_r((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt_handle_basic_auth_401s
	cCstj|j|j|_y|jjWntk
r?nXt|jdrs|jjdkrsd|j_n|jj
||S(Nt
num_401_callsi(tauth_compattHTTPDigestAuthRRRtinit_per_thread_statetAttributeErrorRR!Rt
handle_401(R	RR((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt_handle_digest_auth_401's
cKsW|jjddj}d|kr7|j||Sd|krS|j||SdS(s/Resends a request with auth headers, if needed.swww-authenticatettbasictdigestN(theaderstgettlowerR R'(R	RRtwww_authenticate((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR&:s
cCs]|jdk	r|j|Sy|jj|_Wntk
rEnX|jd|j|S(Ntresponse(RRR
ttellRR%t
register_hookR&(R	R((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt__call__Es

(t__name__t
__module__t__doc__R
R R'R&R2(((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR	s				tGuessProxyAuthcBsGeZdZdddddZdZdZdZdZRS(sZ
    Guesses the auth type by WWW-Authentication and Proxy-Authentication
    headers
    cCs8tt|j||||_||_d|_dS(N(tsuperR6R
tproxy_usernametproxy_passwordRt
proxy_auth(R	RRR8R9((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR
Ws		cCs|jdk	r(|jjj|jn|j|jj|jj}t	|dslt
j|_nt
j
|j|j|j|j|jtj|j|j|_|j|}|jj||}|jj|||_|S(NR(RRRR
RRRRRRRRRRRRt
HTTPProxyAuthR8R9R:RRRR(R	RRRR((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt_handle_basic_auth_407^s 
	cCsYtjd|jd|j|_y|jjWntk
rEnX|jj||S(NRR(	RtHTTPProxyDigestAuthR8R9R:RR$R%t
handle_407(R	RR((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt_handle_digest_auth_407ss		
cKsW|jjddj}d|kr7|j||Sd|krS|j||SdS(NsProxy-AuthenticateR(R)R*(R+R,R-R<R?(R	RRtproxy_authenticate((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR>s
cCst|jdk	r!|j|}ny|jj|_Wntk
rJnX|jd|jtt	|j
|S(NR/(R:RR
R0RR%R1R>R7R6R2(R	R((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR2s
N(	R3R4R5RR
R<R?R>R2(((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR6Rs				N(R5trequestsRRR(RR"RtAuthBaseRR6(((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt<module>s
I