Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`words`.`protocols`.`jabber`.`component`.`ListenComponentAuthenticator``

class documentation

`class ListenComponentAuthenticator(xmlstream.ListenAuthenticator): (source)`

View In Hierarchy

Authenticator for accepting components.

Present Since
8.2

Method | `__init__` | Undocumented
Method | `associateWithStream` | Associate the authenticator with a stream.
Method | `onElement` | Called on incoming XML Stanzas.
Method | `onHandshake` | Called upon receiving the handshake request.
Method | `streamStarted` | Called by the stream when it has started.
Instance Variable | `secret` | The shared secret used to authorized incoming component connections.

Inherited from `ListenAuthenticator`:

Class Variable | `namespace` | Undocumented

Inherited from `Authenticator` (via `ListenAuthenticator`):

Method | `connectionMade` | Called by the XmlStream when the underlying socket connection is in place.
Instance Variable | `xmlstream` | The XmlStream that needs authentication

def __init__(self, secret): (source)
overrides `twisted.words.protocols.jabber.xmlstream.Authenticator.__init__`

Undocumented

def associateWithStream(self, xs): (source)
overrides `twisted.words.protocols.jabber.xmlstream.ListenAuthenticator.associateWithStream`

Associate the authenticator with a stream.

This sets the stream's version to 0.0, because the XEP-0114 component protocol was not designed for XMPP 1.0.

def onElement(self, element): (source)

Called on incoming XML Stanzas.

The very first element received should be a request for handshake. Otherwise, the stream is dropped with a 'not-authorized' error. If a handshake request was received, the hash is extracted and passed to `onHandshake`.

def onHandshake(self, handshake): (source)

Called upon receiving the handshake request.

This checks that the given hash in `handshake` is equal to a calculated hash, responding with a handshake reply or a stream error. If the handshake was ok, the stream is authorized, and XML Stanzas may be exchanged.

def streamStarted(self, rootElement): (source)
overrides `twisted.words.protocols.jabber.xmlstream.ListenAuthenticator.streamStarted`

Called by the stream when it has started.

This examines the default namespace of the incoming stream and whether there is a requested hostname for the component. Then it generates a stream identifier, sends a response header and adds an observer for the first incoming element, triggering `onElement`.

secret: `unicode`. = (source)

The shared secret used to authorized incoming component connections.