twisted.words.protocols.jabber.sasl_mechanisms.DigestMD5(object)
class documentationtwisted.words.protocols.jabber.sasl_mechanisms
View Source
(View In Hierarchy)
Implements interfaces: twisted.words.protocols.jabber.sasl_mechanisms.ISASLMechanism
Implements the DIGEST-MD5 SASL authentication mechanism.
The DIGEST-MD5 SASL authentication mechanism is defined in RFC 2831.
Method | __init__ | |
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 |
Parameters | serv_type | An indication of what kind of server authentication is being attempted
against. For example, u"xmpp" . (type: unicode ) |
host | The authentication hostname. Also known as the realm. This is used as a
scope to help select the right credentials. (type: unicode ) | |
serv_name | An additional identifier for the server. (type: unicode ) | |
username | The authentication username to use to respond to a challenge. (type: unicode ) | |
username | The authentication password to use to respond to a challenge. (type: unicode ) |
Get the initial client response, if defined for this mechanism.
Returns | initial client response string. (type: str .) |
Get the response to a server challenge.
Parameters | challenge | server challenge. (type: str .) |
Returns | client response. (type: str .) |
Parses the server challenge.
Splits the challenge into a dictionary of directives with values.
Returns | challenge directives and their values. (type: dict of str to str .) |
Create message string from directives.
Parameters | directives | dictionary of directives (names to their values). For certain directives,
extra quotes are added, as needed. (type: dict of str to str ) |
Returns | message string. (type: str .) |
Calculates response with given encoded parameters.
Returns | The response field of a response to a Digest-MD5 challenge of the
given parameters. (type: bytes ) |
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.