auth

This module contains the authentication handlers for Requests.

Module Contents

Classes

AuthBase() Base class that all auth implementations derive from
HTTPBasicAuth(self,username,password) Attaches HTTP Basic Authentication to the given Request object.
HTTPProxyAuth() Attaches HTTP Proxy Authentication to a given Request object.
HTTPDigestAuth(self,username,password) Attaches HTTP Digest Authentication to the given Request object.

Functions

_basic_auth_str(username,password) Returns a Basic Auth string.
_basic_auth_str(username, password)

Returns a Basic Auth string.

class AuthBase

Base class that all auth implementations derive from

__call__(r)
class HTTPBasicAuth(username, password)

Attaches HTTP Basic Authentication to the given Request object.

__init__(username, password)
__eq__(other)
__ne__(other)
__call__(r)
class HTTPProxyAuth

Attaches HTTP Proxy Authentication to a given Request object.

__call__(r)
class HTTPDigestAuth(username, password)

Attaches HTTP Digest Authentication to the given Request object.

__init__(username, password)
init_per_thread_state()
build_digest_header(method, url)
handle_redirect(r, **kwargs)

Reset num_401_calls counter on redirects.

handle_401(r, **kwargs)

Takes the given response and tries digest-auth, if needed.

__call__(r)
__eq__(other)
__ne__(other)