Package twisted :: Package protocols :: Package jabber :: Module component :: Class ComponentAuthenticator
[frames | no frames]

Class ComponentAuthenticator

Authenticator --+
                |
               ComponentAuthenticator


Authenticator to permit an XmlStream to authenticate against a Jabber Server as a Component

This implements the basic component authentication. Unfortunately this protocol is not formally described anywhere. Fortunately, all the Jabber servers I know of use this mechanism in exactly the same way.
Method Summary
  __init__(self, componentjid, password)
  _handshakeEvent(self, elem)
  streamStarted(self, rootelem)
Called by the XmlStream when it has received a root element from the connected peer.
    Inherited from Authenticator
  associateWithStream(self, xmlstream)
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 namespace: Default namespace for the XmlStream
    Inherited from Authenticator
int version: Version attribute for XmlStream.

Method Details

__init__(self, componentjid, password)
(Constructor)

Parameters:
componentjid - Jabber ID that this component wishes to bind to.
           (type=str)
password - Password/secret this component uses to authenticate.
           (type=str)
Overrides:
twisted.protocols.xmlstream.Authenticator.__init__

streamStarted(self, rootelem)

Called by the XmlStream when it has received a root element from the connected peer.
Parameters:
rootelem - The root element of the XmlStream received from the streamHost
           (type=Element)
Overrides:
twisted.protocols.xmlstream.Authenticator.streamStarted (inherited documentation)

Class Variable Details

namespace

Default namespace for the XmlStream
Type:
str
Value:
'jabber:component:accept'                                              

Generated by Epydoc 2.0 on Sat Sep 13 04:20:36 2003 http://epydoc.sf.net