/usr/lib/python3.9/site-packages/requests/__pycache__
NameSizeModeActions
adapters.cpython-39.opt-1.pyc225890644editdlrm
adapters.cpython-39.pyc225890644editdlrm
api.cpython-39.opt-1.pyc67110644editdlrm
api.cpython-39.pyc67110644editdlrm
auth.cpython-39.opt-1.pyc82830644editdlrm
auth.cpython-39.pyc82830644editdlrm
certs.cpython-39.opt-1.pyc8320644editdlrm
certs.cpython-39.pyc8320644editdlrm
compat.cpython-39.opt-1.pyc16050644editdlrm
compat.cpython-39.pyc16050644editdlrm
cookies.cpython-39.opt-1.pyc187740644editdlrm
cookies.cpython-39.pyc187740644editdlrm
exceptions.cpython-39.opt-1.pyc51850644editdlrm
exceptions.cpython-39.pyc51850644editdlrm
help.cpython-39.opt-1.pyc26100644editdlrm
help.cpython-39.pyc26100644editdlrm
hooks.cpython-39.opt-1.pyc9420644editdlrm
hooks.cpython-39.pyc9420644editdlrm
models.cpython-39.opt-1.pyc238190644editdlrm
models.cpython-39.pyc238190644editdlrm
packages.cpython-39.opt-1.pyc3610644editdlrm
packages.cpython-39.pyc3610644editdlrm
sessions.cpython-39.opt-1.pyc198160644editdlrm
sessions.cpython-39.pyc198160644editdlrm
status_codes.cpython-39.opt-1.pyc41910644editdlrm
status_codes.cpython-39.pyc41910644editdlrm
structures.cpython-39.opt-1.pyc44120644editdlrm
structures.cpython-39.pyc44120644editdlrm
utils.cpython-39.opt-1.pyc237500644editdlrm
utils.cpython-39.pyc237500644editdlrm
_internal_utils.cpython-39.opt-1.pyc12280644editdlrm
_internal_utils.cpython-39.pyc12540644editdlrm
__init__.cpython-39.opt-1.pyc32890644editdlrm
__init__.cpython-39.pyc34330644editdlrm
__version__.cpython-39.opt-1.pyc5070644editdlrm
__version__.cpython-39.pyc5070644editdlrm
Edit: /usr/lib/python3.9/site-packages/requests/__pycache__/auth.cpython-39.pyc (8283B)
a ¥/�hß'ã@sÌdZddlZddlZddlZddlZddlZddlZddlmZddl m Z m Z m Z ddl mZddlmZddlmZd Zd Zd d „ZGd d„deƒZGdd„deƒZGdd„deƒZGdd„deƒZdS)z] requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. éN)Ú b64encodeé)ÚurlparseÚstrÚ basestring)Úextract_cookies_to_jar)Úto_native_string)Úparse_dict_headerz!application/x-www-form-urlencodedzmultipart/form-datacCsšt|tƒs&tjd |¡td�t|ƒ}t|tƒsPtjd t|ƒ¡td�t|ƒ}t|tƒrd| d¡}t|tƒrx| d¡}dt t d  ||f¡ƒ  ¡ƒ}|S)zReturns a Basic Auth string.z·Non-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.)Úcategoryz·Non-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.Úlatin1zBasic ó:) Ú isinstancerÚwarningsÚwarnÚformatÚDeprecationWarningrÚtypeÚencoderrÚjoinÚstrip)ÚusernameÚpasswordZauthstr©rú1/usr/lib/python3.9/site-packages/requests/auth.pyÚ_basic_auth_strs0 ýû ýû    ÿrc@seZdZdZdd„ZdS)ÚAuthBasez4Base class that all auth implementations derive fromcCs tdƒ‚dS)NzAuth hooks must be callable.)ÚNotImplementedError©ÚselfÚrrrrÚ__call__KszAuthBase.__call__N©Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrrrrHsrc@s0eZdZdZdd„Zdd„Zdd„Zdd „Zd S) Ú HTTPBasicAuthz?Attaches HTTP Basic Authentication to the given Request object.cCs||_||_dS©N)rr©rrrrrrÚ__init__RszHTTPBasicAuth.__init__cCs(t|jt|ddƒk|jt|ddƒkgƒS©Nrr©ÚallrÚgetattrr©rÚotherrrrÚ__eq__VsþzHTTPBasicAuth.__eq__cCs ||k Sr'rr.rrrÚ__ne__\szHTTPBasicAuth.__ne__cCst|j|jƒ|jd<|S)NÚ Authorization©rrrÚheadersrrrrr _szHTTPBasicAuth.__call__N)r"r#r$r%r)r0r1r rrrrr&Os r&c@seZdZdZdd„ZdS)Ú HTTPProxyAuthz=Attaches HTTP Proxy Authentication to a given Request object.cCst|j|jƒ|jd<|S)NzProxy-Authorizationr3rrrrr gszHTTPProxyAuth.__call__Nr!rrrrr5dsr5c@sPeZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z dd„Z dS)ÚHTTPDigestAuthz@Attaches HTTP Digest Authentication to the given Request object.cCs||_||_t ¡|_dSr')rrÚ threadingÚlocalÚ _thread_localr(rrrr)oszHTTPDigestAuth.__init__cCs@t|jdƒs.md5_utf8ZSHAcSs"t|tƒr| d¡}t |¡ ¡SrH)r rrrJÚsha1rKrLrrrÚsha_utf8—s  z4HTTPDigestAuth.build_digest_header..sha_utf8zSHA-256cSs"t|tƒr| d¡}t |¡ ¡SrH)r rrrJZsha256rKrLrrrÚ sha256_utf8�s  z7HTTPDigestAuth.build_digest_header..sha256_utf8zSHA-512cSs"t|tƒr| d¡}t |¡ ¡SrH)r rrrJZsha512rKrLrrrÚ sha512_utf8£s  z7HTTPDigestAuth.build_digest_header..sha512_utf8csˆd||fƒS)Nú%s:%sr)ÚsÚd©Z hash_utf8rrÚ©óz4HTTPDigestAuth.build_digest_header..ú/ú?z%s:%s:%srSrz%08xrIééZauthú,z%s:%s:%s:%s:%sz>username="%s", realm="%s", nonce="%s", uri="%s", response="%s"z , opaque="%s"z, algorithm="%s"z , digest="%s"z , qop="auth", nc=%s, cnonce="%s"z Digest %s)r9r?ÚgetÚupperrÚpathÚqueryrrr=r>rrÚtimeÚctimeÚosÚurandomrJrOrKÚsplit)rÚmethodÚurlrCrDrErFrGZ _algorithmrNrPrQrRZKDZentdigZp_parsedr`ZA1ZA2ZHA1ZHA2ZncvaluerTZcnonceZrespdigZnoncebitÚbaserrVrÚbuild_digest_headers‚        ÿ ÿ   z"HTTPDigestAuth.build_digest_headercKs|jrd|j_dS)z)Reset num_401_calls counter on redirects.rN)Z is_redirectr9rA)rrÚkwargsrrrÚhandle_redirectåszHTTPDigestAuth.handle_redirectcKs&d|jkrdks$nd|j_|S|jjdurB|jj |jj¡|j dd¡}d|  ¡v�r|jjdk�r|jjd7_t j d t j d �}t |jd|dd �ƒ|j_|j| ¡|j ¡}t|j|j|jƒ| |j¡| |j|j¡|jd <|jj|fi|¤Ž}|j |¡||_|Sd|j_|S) zo Takes the given response and tries digest-auth, if needed. :rtype: requests.Response i�iôrNzwww-authenticater;Zdigestézdigest )Úflags)Úcountr2)Z status_coder9rAr@ZrequestÚbodyÚseekr4r^ÚlowerÚreÚcompileÚ IGNORECASEr Úsubr?ZcontentÚcloseÚcopyrZ_cookiesÚrawZprepare_cookiesrjrgrhZ connectionÚsendÚhistoryÚappend)rrrkZs_authÚpatZprepZ_rrrrÚ handle_401ês0    ÿ  zHTTPDigestAuth.handle_401cCs|| ¡|jjr&| |j|j¡|jd<z|j ¡|j_ Wnt yRd|j_ Yn0|  d|j ¡|  d|j ¡d|j_|S)Nr2Zresponser)rBr9r=rjrgrhr4rpÚtellr@ÚAttributeErrorZ register_hookr~rlrArrrrr s zHTTPDigestAuth.__call__cCs(t|jt|ddƒk|jt|ddƒkgƒSr*r+r.rrrr0*sþzHTTPDigestAuth.__eq__cCs ||k Sr'rr.rrrr10szHTTPDigestAuth.__ne__N) r"r#r$r%r)rBrjrlr~r r0r1rrrrr6ls f,r6)r%rdrsrbrJr7rÚbase64rÚcompatrrrZcookiesrZ_internal_utilsrZutilsr ZCONTENT_TYPE_FORM_URLENCODEDZCONTENT_TYPE_MULTI_PARTrÚobjectrr&r5r6rrrrÚs$    ,