b.t.h.AuthServer(http_server.HttpServer) : class documentation

Part of bzrlib.tests.http_utils View In Hierarchy

Known subclasses: bzrlib.tests.http_utils.DigestAuthServer, bzrlib.tests.http_utils.HTTPAuthServer, bzrlib.tests.http_utils.ProxyAuthServer

Extends HttpServer with a dictionary of passwords.

This is used as a base class for various schemes which should all use or redefined the associated AuthRequestHandler.

Note that no users are defined by default, so add_user should be called before issuing the first request.

Method __init__ Constructor.
Method add_user Declare a user with an associated password.
Method authorized Check that the given user provided the right password

Inherited from HttpServer:

Method create_server Undocumented
Method log Capture Server log output.
Method start_server See bzrlib.transport.Server.start_server.
Method get_url See bzrlib.transport.Server.get_url.
Method get_bogus_url See bzrlib.transport.Server.get_bogus_url.
Method _get_remote_url Undocumented

Inherited from TestingTCPServerInAThread (via HttpServer):

Method __repr__ Undocumented
Method run_server Undocumented
Method stop_server Remove the server and cleanup any resources it owns.
Method set_ignored_exceptions Install an exception handler for the server.
Method pending_exception Raise uncaught exception in the server.
def __init__(self, request_handler, auth_scheme, protocol_version=None):
Constructor.
Parametersrequest_handlera class that will be instantiated to handle an http connection (one or several requests).
protocol_versionif specified, will override the protocol version of the request handler.
def add_user(self, user, password):
Declare a user with an associated password.

password can be empty, use an empty string ('') in that case, not None.

def authorized(self, user, password):
Check that the given user provided the right password
API Documentation for Bazaar, generated by pydoctor at 2020-07-02 03:56:49.