Lines Matching refs:auth
916 # Add a default for prior auth requests
941 # XXX this allows for multiple auth-schemes, but will stupidly pick
956 # XXX could pre-emptively send auth info already accepted (RFC 2617,
1016 auth = "Basic " + base64.b64encode(raw.encode()).decode("ascii")
1017 if req.get_header(self.auth_header, None) == auth:
1019 req.add_unredirected_header(self.auth_header, auth)
1089 # XXX qop="auth-int" supports is shaky
1111 raise HTTPError(req.full_url, 401, "digest auth failed",
1123 def retry_http_digest_auth(self, req, auth):
1124 token, challenge = auth.split(' ', 1)
1126 auth = self.get_authorization(req, chal)
1127 if auth:
1128 auth_val = 'Digest %s' % auth
1176 # NOTE: As per RFC 2617, when server sends "auth,auth-int", the client could use either `auth`
1177 # or `auth-int` to the response back. we use `auth` to send the response back.
1180 elif 'auth' in qop.split(','):
1188 noncebit = "%s:%s:%s:%s:%s" % (nonce, ncvalue, cnonce, 'auth', H(A2))
1191 # XXX handle auth-int.
1205 base += ', qop=auth, nc=%s, cnonce="%s"' % (ncvalue, cnonce)
1234 handler_order = 490 # before Basic auth
1247 handler_order = 490 # before Basic auth
1921 auth = base64.b64encode(user_passwd.encode()).decode('ascii')
1923 auth = None
1928 if auth:
1929 headers["Authorization"] = "Basic %s" % auth