Home | Trees | Index | Help |
|
---|
Package pyxmpp :: Package jabber :: Module clientstream :: Class LegacyClientStream |
|
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. | |
Do the first stage (<iq type='get'/>) of legacy ("plain" or "digest") authentication. | |
Handle the second stage (<iq type='set'/>) of legacy "digest" authentication. | |
Do the second stage (<iq type='set'/>) of legacy "digest" authentication. | |
Handle the second stage (<iq type='set'/>) of legacy "plain" authentication. | |
Do the second stage (<iq type='set'/>) of legacy "plain" authentication. | |
Unregister legacy authentication handlers after successfull authentication. | |
Initialize authentication when the connection is established and we are the initiator. | |
Reset the `LegacyClientStream` object state, making the object ready to handle new connections. | |
Try to authenticate using the first one of allowed authentication methods left. | |
Inherited from ClientStream | |
Accept an incoming client connection. | |
Check authorization id provided by the client. | |
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. | |
Get a user password for the SASL authentication. | |
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. | |
Same as `ClientStream.connect` but assume `self.lock` is acquired. | |
Include resource binding feature in the stream features list. | |
Inherited from Stream | |
Process incoming <stream:features/> element. | |
Create the <features/> element for the stream. | |
Process first level element of the stream. | |
Inherited from StreamTLSMixIn | |
Get the TLS connection object for the stream. | |
Process incoming StartTLS related element of <stream:features/>. | |
Update the <features/> with StartTLS feature. | |
Initiate TLS connection. | |
Same as `Stream.process` but assume `self.lock` is acquired. | |
Process incoming stream element. | |
Process stream element in the TLS namespace. | |
Read data pending on the stream socket and pass it to the parser. | |
Read data pending on the stream socket and pass it to the parser. | |
Request a TLS-encrypted connection. | |
Reset `StreamTLSMixIn` object state making it ready to handle new connections. | |
Certificate verification callback for TLS connections. | |
Same as `Stream.write_raw` but assume `self.lock` is acquired. | |
Inherited from StreamSASLMixIn | |
Process incoming <stream:features/> element. | |
Add SASL features to the <features/> element of the stream. | |
Process incoming stream element. | |
Process incoming <sasl:abort/> element. | |
Process incoming <sasl:auth/> element. | |
Process incoming <sasl:challenge/> element. | |
Process incoming <sasl:failure/> element. | |
Process stream element in the SASL namespace. | |
Process incoming <sasl:response/> element. | |
Process incoming <sasl:success/> element. | |
Reset `StreamSASLMixIn` object state making it ready to handle new connections. | |
Start SASL authentication process. | |
Inherited from PasswordManager | |
Check the password validity. | |
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. | |
Same as `Stream.accept` but assume `self.lock` is acquired. | |
Handle resource binding success. | |
Handle resource binding success. | |
Same as `Stream.close` but assume `self.lock` is acquired. | |
Initialize stream on outgoing connection. | |
Same as `Stream.disconnect` but assume `self.lock` is acquired. | |
Feed the stream reader with data received. | |
Same as `Stream.idle` but assume `self.lock` is acquired. | |
Same as `Stream.loop_iter` but assume `self.lock` is acquired. | |
Create ne `xmlextra.StreamReader` instace as `self._reader`. | |
Process first level stream-namespaced element of the stream. | |
Restart the stream as needed after SASL and StartTLS negotiation. | |
Same as `Stream.send` but assume `self.lock` is acquired. | |
Send stream end tag. | |
Send stream error element. | |
Send stream <features/>. | |
Send stream start tag. | |
Write XML `xmlnode` to the stream. | |
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. | |
Same as `Stream.set_response_handlers` but assume `self.lock` is acquired. | |
Inherited from StreamHandler | |
Process complete stanza. | |
Process stream end. | |
Process stream start. |
Method Details |
---|
__init__(self,
jid,
password=None,
server=None,
port=5222,
auth_methods=('sasl:DIGEST-MD5', 'digest'),
tls_settings=None,
keepalive=0)
|
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] :Parameters: - `stanza`: the error stanza received or `None` on timeout. :Types: - `stanza`: `pyxmpp.stanza.Stanza` |
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. :Parameters: - `stanza`: the stanza received. :Types: - `stanza`: `pyxmpp.iq.Iq` |
registration_success(self, stanza)Handle registration success. [client only] Clean up registration stuff, change state to "registered" and initialize authentication. :Parameters: - `stanza`: the stanza received. :Types: - `stanza`: `pyxmpp.iq.Iq` |
submit_registration_form(self, form)Submit a registration form. [client only] :Parameters: - `form`: the filled-in form. When form is `None` or its type is "cancel" the registration is to be canceled. :Types: - `form`: `pyxmpp.jabber.dataforms.Form` |
_auth_stage1(self)Do the first stage (<iq type='get'/>) of legacy ("plain" or "digest") authentication. [client only] |
_digest_auth_in_stage2(self, username, _unused, stanza)Handle the second stage (<iq type='set'/>) of legacy "digest" authentication. [server only] |
_digest_auth_stage2(self, _unused)Do the second stage (<iq type='set'/>) of legacy "digest" authentication. [client only] |
_plain_auth_in_stage2(self, username, _unused, stanza)Handle the second stage (<iq type='set'/>) of legacy "plain" authentication. [server only] |
_plain_auth_stage2(self, _unused)Do the second stage (<iq type='set'/>) of legacy "plain" authentication. [client only] |
_post_auth(self)Unregister legacy authentication handlers after successfull authentication.
|
_post_connect(self)Initialize authentication when the connection is established and we are the initiator. |
_reset(self)Reset the `LegacyClientStream` object state, making the object ready to handle new connections.
|
_try_auth(self)Try to authenticate using the first one of allowed authentication methods left. [client only]
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed May 31 22:36:59 2006 | http://epydoc.sf.net |