class documentation

class twisted.words.protocols.jabber.client.BasicAuthenticator(xmlstream.ConnectAuthenticator): (source)

View In Hierarchy

Authenticates an XmlStream against a Jabber server as a Client.

This only implements non-SASL authentication, per JEP-0078. Additionally, this authenticator provides the ability to perform inline registration, per JEP-0077.

Under normal circumstances, the BasicAuthenticator generates the xmlstream.STREAM_AUTHD_EVENT once the stream has authenticated. However, it can also generate other events, such as:

If authentication fails for any reason, you can attempt to register by calling the registerAccount method. If the registration succeeds, a xmlstream.STREAM_AUTHD_EVENT will be fired. Otherwise, one of the above errors will be generated (again).

Class Variable INVALID_USER_EVENT See IQAuthInitializer.INVALID_USER_EVENT.
Class Variable AUTH_FAILED_EVENT See IQAuthInitializer.AUTH_FAILED_EVENT.
Class Variable REGISTER_FAILED_EVENT Token to signal that registration failed.
Class Variable namespace Undocumented
Method __init__ Undocumented
Instance Variable jid Undocumented
Instance Variable password Undocumented
Method associateWithStream Called by the XmlStreamFactory when a connection has been made to the requested peer, and an XmlStream object has been instantiated.
Method registerAccount Undocumented
Method _registerResultEvent Undocumented

Inherited from ConnectAuthenticator:

Instance Variable otherHost Undocumented
Method connectionMade Called by the XmlStream when the underlying socket connection is in place.
Method initializeStream Perform stream initialization procedures.
Method streamStarted Called by the XmlStream when the stream has started.

Inherited from Authenticator (via ConnectAuthenticator):

Instance Variable xmlstream The XmlStream that needs authentication
INVALID_USER_EVENT = (source)
REGISTER_FAILED_EVENT = (source)
Token to signal that registration failed.
(type: str)
def __init__(self, jid, password): (source)

Undocumented

password = (source)

Undocumented

def associateWithStream(self, xs): (source)

Called by the XmlStreamFactory when a connection has been made to the requested peer, and an XmlStream object has been instantiated.

The default implementation just saves a handle to the new XmlStream.

ParametersxsUndocumented
xmlstreamThe XmlStream that will be passing events to this Authenticator. (type: XmlStream)
def registerAccount(self, username=None, password=None): (source)

Undocumented

def _registerResultEvent(self, iq): (source)

Undocumented

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.