Home | Trees | Index | Help |
|
---|
Package twisted :: Package protocols :: Package jabber :: Module client :: Class BasicAuthenticator |
|
Authenticator
--+ |ConnectAuthenticator
--+ | BasicAuthenticator
Authenticates an XmlStream against a Jabber server as a Client
This only implements non-SASL authentication, per JEP 78. Additionally, this authenticator provides the ability to perform inline registration, per JEP 77.
Under normal circumstances, the BasicAuthenticator generates theSTREAM_AUTHD_EVENT
once the stream has authenticated.
However, it can also generate other events, such as:
INVALID_USER_EVENT
: Authentication
failed, due to invalid username
AUTH_FAILED_EVENT
: Authentication
failed, due to invalid password
REGISTER_FAILED_EVENT
: Registration
failed
registerAccount
method. If the registration
succeeds, a STREAM_AUTHD_EVENT
will be fired. Otherwise, one
of the above errors will be generated (again).
Method Summary | |
---|---|
__init__(self,
jid,
password)
| |
_authQueryResultEvent(self,
iq)
| |
_authResultEvent(self,
iq)
| |
_registerResultEvent(self,
iq)
| |
registerAccount(self,
username,
password)
| |
Called by the XmlStream when it has received a root element from the connected peer. | |
Inherited from ConnectAuthenticator | |
Called by the XmlStream when the underlying socket connection is in place. | |
Inherited from Authenticator | |
Called by the XmlStreamFactory when a connection has been made to the requested peer, and an XmlStream object has been instantiated. |
Instance Variable Summary | |
---|---|
Inherited from Authenticator | |
str |
streamHost : Target host for this stream (used as the 'to' attribute) |
XmlStream |
xmlstream : The XmlStream that needs authentication |
Class Variable Summary | |
---|---|
str |
AUTH_FAILED_EVENT = '//event/client/basicauth/authfailed...
|
str |
INVALID_USER_EVENT = '//event/client/basicauth/invalidus...
|
str |
namespace : Default namespace for the XmlStream |
str |
REGISTER_FAILED_EVENT = '//event/client/basicauth/regist...
|
Inherited from Authenticator | |
int |
version : Version attribute for XmlStream. |
Method Details |
---|
streamStarted(self, rootelem)Called by the XmlStream when it has received a root element from the connected peer.
|
Class Variable Details |
---|
AUTH_FAILED_EVENT
|
INVALID_USER_EVENT
|
namespaceDefault namespace for the XmlStream
|
REGISTER_FAILED_EVENT
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat May 15 20:08:48 2004 | http://epydoc.sf.net |