module documentation

Undocumented

Class UnknownAuthConfig The authentication config provided couldn't be interpreted.
Function add_auth Wrap an agent to perform authentication
Function add_basic_auth Wrap an agent to add HTTP basic authentication
Class _RequestHeaderSetterAgent Wrap an agent to set request headers
def add_auth(agent, auth_config): (source)

Wrap an agent to perform authentication :param agent: Agent to wrap. :param auth_config: A ``('username', 'password')`` tuple --- see :func:`add_basic_auth`. :returns: :class:`~twisted.web.iweb.IAgent` :raises UnknownAuthConfig: When the format *auth_config* isn't supported.

def add_basic_auth(agent, username, password): (source)

Wrap an agent to add HTTP basic authentication The returned agent sets the *Authorization* request header according to the basic authentication scheme described in :rfc:`7617`. This header contains the given *username* and *password* in plaintext, and thus should only be used over an encrypted transport (HTTPS). Note that the colon (``:``) is used as a delimiter between the *username* and *password*, so if either parameter includes a colon the interpretation of the *Authorization* header is server-defined. :param agent: Agent to wrap. :param username: The username. :param password: The password. :returns: :class:`~twisted.web.iweb.IAgent`