b.t.h._.BasicAuthHandler(AbstractAuthHandler) : class documentation

Part of bzrlib.transport.http._urllib2_wrappers View In Hierarchy

Known subclasses: bzrlib.transport.http._urllib2_wrappers.HTTPBasicAuthHandler, bzrlib.transport.http._urllib2_wrappers.ProxyBasicAuthHandler

A custom basic authentication handler.
Method build_auth_header Build the value of the header used to authenticate.
Method extract_realm Undocumented
Method auth_match Check that we are able to handle that authentication scheme.
Method auth_params_reusable Undocumented

Inherited from AbstractAuthHandler:

Method __init__ Undocumented
Method update_auth Update a value in auth marking the auth as modified if needed
Method auth_required Retry the request if the auth scheme is ours.
Method add_auth_header Add the authentication header to the request
Method auth_successful The authentification was successful for the request.
Method get_user_password Ask user for a password if none is already available.
Method http_request Insert an authentication header if information is available
Method _parse_auth_header Parse the authentication header.
Method _build_password_prompt Build a prompt taking the protocol used into account.
Method _build_username_prompt Build a prompt taking the protocol used into account.
def build_auth_header(self, auth, request):
Build the value of the header used to authenticate.
ParametersauthThe auth parameters needed to build the header.
requestThe request needing authentication.
ReturnsNone or header.
def extract_realm(self, header_value):
Undocumented
def auth_match(self, header, auth):
Check that we are able to handle that authentication scheme.

The request authentication parameters may need to be updated with info from the server. Some of these parameters, when combined, are considered to be the authentication key, if one of them change the authentication result may change. 'user' and 'password' are exampls, but some auth schemes may have others (digest's nonce is an example, digest's nonce_count is a counter-example). Such parameters must be updated by using the update_auth() method.

ParametersheaderThe authentication header sent by the server.
authThe auth parameters already known. They may be updated.
ReturnsTrue if we can try to handle the authentication.
def auth_params_reusable(self, auth):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2019-12-15 00:42:34.