Home | Trees | Index | Help |
|
---|
|
StanzaProcessor
--+ |StreamHandler
--+ |StreamBase
--+ |PasswordManager
--+ | | |StreamSASLMixIn
--+ |StreamTLSMixIn
--+ |Stream
--+ | ClientStream
LegacyClientStream
Handles XMPP-IM client connection stream.
Both client and server side of the connection is supported. This class handles client SASL authentication, authorisation and resource binding.
This class is not ready for handling of legacy Jabber servers, as it doesn't provide legacy authentication.
Method Summary | |
---|---|
Initialize the ClientStream object. | |
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 | |
---|---|
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=None,
auth_methods=('sasl:DIGEST-MD5',),
tls_settings=None,
keepalive=0)
Initialize the ClientStream object. |
accept(self, sock)Accept an incoming client connection. [server only]
|
check_authzid(self, authzid, extra_info=None)Check authorization id provided by the client. [server only]
|
choose_realm(self, realm_list)Choose authentication realm from the list provided by the server. [client only] Use domain of the own JID if no realm list was provided or the domain is on the list or the first realm on the list otherwise.
|
connect(self, server=None, port=None)Establish a client connection to a server. [client only]
|
do_bind(self, stanza)Do the resource binding requested by a client connected. [server only]
|
fix_in_stanza(self, stanza)Fix an incoming stanza. Ona server replace the sender address with authorized client JID. |
fix_out_stanza(self, stanza)Fix outgoing stanza. On a client clear the sender JID. On a server set the sender address to the own JID if the address is not set yet. |
get_password(self, username, realm=None, acceptable_formats=('plain',))Get a user password for the SASL authentication.
|
get_realms(self)Get realms available for client authentication. [server only]
|
get_serv_host(self)Get the service host name for SASL authentication.
|
get_serv_name(self)Get the service name for SASL authentication.
|
get_serv_type(self)Get the server name for SASL authentication.
|
Instance Variable Details |
---|
auth_methodsallowed authentication methods.
|
my_jidrequested local JID. Please notice that this may differ fromme , which is actual authorized JID after the resource binding.
|
passworduser's password.
|
portport number to use.
|
serverserver to use.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 26 17:57:32 2005 | http://epydoc.sf.net |