Home | Trees | Index | Help |
|
---|
|
StanzaProcessor
--+ |StreamHandler
--+ |StreamBase
--+ |PasswordManager
--+ | | |StreamSASLMixIn
--+ |StreamTLSMixIn
--+ |Stream
--+ |ClientStream
--+ | LegacyClientStream
Handles Jabber (both XMPP and legacy protocol) client connection stream.
Both client and server side of the connection is supported. This class handles client SASL and legacy authentication, authorisation and XMPP resource binding.
Method Summary | |
---|---|
Initialize a LegacyClientStream object. | |
Handle legacy authentication error. | |
Handle success of the legacy authentication. | |
Handle the first stage (<iq type='get'/>) of legacy ("plain" or "digest") authentication. | |
Handle the second stage (<iq type='set'/>) of legacy ("plain" or "digest") authentication. | |
Handle the first stage authentication response (result of the <iq type="get"/>). | |
Handle legacy authentication timeout. | |
Handle in-band registration error. | |
Handle registration form received. | |
Handle registration success. | |
Submit a registration form. | |
Inherited from ClientStream | |
Accept an incoming client connection. | |
bool |
Check authorization id provided by the client. |
unicode |
Choose authentication realm from the list provided by the server. |
Establish a client connection to a server. | |
Do the resource binding requested by a client connected. | |
Fix an incoming stanza. | |
Fix outgoing stanza. | |
(unicode ,`str`) |
Get a user password for the SASL authentication. |
list of unicode |
Get realms available for client authentication. |
Get the service host name for SASL authentication. | |
Get the service name for SASL authentication. | |
Get the server name for SASL authentication. | |
Inherited from StreamTLSMixIn | |
Get the TLS connection object for the stream. | |
Inherited from PasswordManager | |
bool |
Check the password validity. |
str |
Generate a random string for digest authentication challenges. |
Inherited from StreamBase | |
| |
Bind to a resource. | |
Check "to" attribute of received stream header. | |
Forcibly close the connection and clear the stream state. | |
Check if stream is connected. | |
Gracefully close the connection. | |
Handle stream XML parse error. | |
Return filedescriptor of the stream socket. | |
Generate a random and unique stream ID. | |
Do some housekeeping (cache expiration, timeout handling). | |
Simple "main loop" for the stream. | |
Single iteration of a simple "main loop" for the stream. | |
Process stream's pending events. | |
Process stream error element received. | |
Write stanza to the stream. | |
Process stanza (first level child element of the stream). | |
Process stanza (first level child element of the stream) start tag -- do nothing. | |
Called when connection state is changed. | |
Process </stream:stream> (stream end) tag received from peer. | |
Process <stream:stream> (stream start) tag received from peer. | |
Write raw data to the stream socket. | |
Inherited from StanzaProcessor | |
Process IQ stanza received. | |
Process message stanza. | |
Process presence stanza. | |
Process stanza received from the stream. | |
Process stanza not addressed to us. | |
Set <iq type="get"/> handler. | |
Set <iq type="set"/> handler. | |
Set a handler for <message/> stanzas. | |
Set a handler for <presence/> stanzas. | |
Set response handler for an IQ "get" or "set" stanza. | |
Remove <iq type="get"/> handler. | |
Remove <iq type="set"/> handler. |
Instance Variable Summary | |
---|---|
Inherited from ClientStream | |
list of str |
auth_methods : allowed authentication methods. |
pyxmpp.JID |
my_jid : requested local JID. |
str |
password : user's password. |
int |
port : port number to use. |
str |
server : server to use. |
Inherited from Stream | |
features : stream features as annouced by the initiator. | |
initiator : True if local stream endpoint is the initiating entity. | |
lock : RLock object used to synchronize access to Stream object. | |
me : local stream endpoint JID. | |
peer : remote stream endpoint JID. | |
process_all_stanzas : when True then all stanzas received are
considered local. | |
tls : TLS connection object. |
Method Details |
---|
__init__(self,
jid,
password=None,
server=None,
port=5222,
auth_methods=('sasl:DIGEST-MD5', 'digest'),
tls_settings=None,
keepalive=0)
Initialize a LegacyClientStream object. |
auth_error(self, stanza)Handle legacy authentication error. [client only] |
auth_finish(self, _unused)Handle success of the legacy authentication. |
auth_in_stage1(self, stanza)Handle the first stage (<iq type='get'/>) of legacy ("plain" or "digest") authentication. [server only] |
auth_in_stage2(self, stanza)Handle the second stage (<iq type='set'/>) of legacy ("plain" or "digest") authentication. [server only] |
auth_stage2(self, stanza)Handle the first stage authentication response (result of the <iq type="get"/>). [client only] |
auth_timeout(self)Handle legacy authentication timeout. [client only] |
registration_error(self, stanza)Handle in-band registration error. [client only]
|
registration_form_received(self, stanza)Handle registration form received. [client only] Call self.registration_callback with the registration form received as the argument. Use the value returned by the callback will be a filled-in form.
|
registration_success(self, stanza)Handle registration success. [client only] Clean up registration stuff, change state to "registered" and initialize authentication.
|
submit_registration_form(self, form)Submit a registration form. [client only]
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 26 17:57:44 2005 | http://epydoc.sf.net |