class documentation

class twisted.words.protocols.jabber.sasl_mechanisms.DigestMD5: (source)

Implements interfaces: twisted.words.protocols.jabber.sasl_mechanisms.ISASLMechanism

View In Hierarchy

Implements the DIGEST-MD5 SASL authentication mechanism.

The DIGEST-MD5 SASL authentication mechanism is defined in RFC 2831.

Class Variable name Common name for the SASL Mechanism.
Method __init__
Instance Variable username Undocumented
Instance Variable password Undocumented
Instance Variable defaultRealm Undocumented
Instance Variable digest_uri Undocumented
Method getInitialResponse Get the initial client response, if defined for this mechanism.
Method getResponse Get the response to a server challenge.
Method _parse Parses the server challenge.
Method _unparse Create message string from directives.
Method _calculateResponse Calculates response with given encoded parameters.
Method _genResponse Generate response-value.
Method _gen_nonce Undocumented
name = (source)

Common name for the SASL Mechanism.

(type: str)
def __init__(self, serv_type, host, serv_name, username, password): (source)
Parametersserv_typeAn indication of what kind of server authentication is being attempted against. For example, u"xmpp". (type: unicode)
hostThe authentication hostname. Also known as the realm. This is used as a scope to help select the right credentials. (type: unicode)
serv_nameAn additional identifier for the server. (type: unicode)
usernameThe authentication username to use to respond to a challenge. (type: unicode)
passwordThe authentication password to use to respond to a challenge. (type: unicode)
username = (source)

Undocumented

password = (source)

Undocumented

defaultRealm = (source)

Undocumented

digest_uri = (source)

Undocumented

def getInitialResponse(self): (source)

Get the initial client response, if defined for this mechanism.

Returnsinitial client response string. (type: str.)
def getResponse(self, challenge): (source)

Get the response to a server challenge.

Parameterschallengeserver challenge. (type: str.)
Returnsclient response. (type: str.)
def _parse(self, challenge): (source)

Parses the server challenge.

Splits the challenge into a dictionary of directives with values.

Returnschallenge directives and their values. (type: dict of str to str.)
def _unparse(self, directives): (source)

Create message string from directives.

Parametersdirectivesdictionary of directives (names to their values). For certain directives, extra quotes are added, as needed. (type: dict of str to str)
Returnsmessage string. (type: str.)
def _calculateResponse(self, cnonce, nc, nonce, username, password, realm, uri): (source)

Calculates response with given encoded parameters.

ReturnsThe response field of a response to a Digest-MD5 challenge of the given parameters. (type: bytes)
def _genResponse(self, charset, realm, nonce): (source)

Generate response-value.

Creates a response to a challenge according to section 2.1.2.1 of RFC 2831 using the charset, realm and nonce directives from the challenge.

def _gen_nonce(self): (source)

Undocumented

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.