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`.`sasl`.`SASLInitiatingInitializer``

class documentation

`class SASLInitiatingInitializer(xmlstream.BaseFeatureInitiatingInitializer): (source)`

View In Hierarchy

Stream initializer that performs SASL authentication.

The supported mechanisms by this initializer are `DIGEST-MD5`, `PLAIN` and `ANONYMOUS`. The `ANONYMOUS` SASL mechanism is used when the JID, set on the authenticator, does not have a localpart (username), requesting an anonymous session where the username is generated by the server. Otherwise, `DIGEST-MD5` and `PLAIN` are attempted, in that order.

Method | `onChallenge` | Parse challenge and send response from the mechanism.
Method | `onFailure` | Clean up observers, parse the failure and errback the deferred.
Method | `onSuccess` | Clean up observers, reset the XML stream and send a new header.
Method | `sendAuth` | Initiate authentication protocol exchange.
Method | `sendResponse` | Send response to a challenge.
Method | `setMechanism` | Select and setup authentication mechanism.
Method | `start` | Start SASL authentication exchange.
Class Variable | `feature` | Undocumented
Instance Variable | `mechanism` | Undocumented
Instance Variable | `_deferred` | Undocumented

Inherited from `BaseFeatureInitiatingInitializer`:

Method | `__init__` | Undocumented
Method | `initialize` | Initiate the initialization.
Instance Variable | `required` | whether the stream feature is required to be advertized by the receiving entity.
Instance Variable | `xmlstream` | The associated XML stream

def onChallenge(self, element): (source)

Parse challenge and send response from the mechanism.

Parameters
element:`domish.Element`. | the challenge protocol element.

def onFailure(self, failure): (source)

Clean up observers, parse the failure and errback the deferred.

Parameters
failure:`domish.Element` | the failure protocol element. Holds details on the error condition.

def onSuccess(self, success): (source)

Clean up observers, reset the XML stream and send a new header.

Parameters
success:`domish.Element` | the success protocol element. For now unused, but could hold additional data.

def sendAuth(self, data=None): (source)

Initiate authentication protocol exchange.

If an initial client response is given in `data`, it will be sent along.

Parameters
data:`str` or `None`. | initial client response.

def sendResponse(self, data=b''): (source)

Send response to a challenge.

Parameters
data:`bytes`. | client response.

def setMechanism(self): (source)

Select and setup authentication mechanism.

Uses the authenticator's `jid` and `password` attribute for the authentication credentials. If no supported SASL mechanisms are advertized by the receiving party, a failing deferred is returned with a `SASLNoAcceptableMechanism` exception.

def start(self): (source)
overrides `twisted.words.protocols.jabber.xmlstream.BaseFeatureInitiatingInitializer.start`

Start SASL authentication exchange.

feature = (source)
overrides `twisted.words.protocols.jabber.xmlstream.BaseFeatureInitiatingInitializer.feature`

Undocumented

mechanism = (source)

Undocumented

_deferred = (source)

Undocumented