class DigestMD5: (source)
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. |
Class Variable | name |
Common name for the SASL Mechanism. |
Instance Variable | defaultRealm |
Undocumented |
Instance Variable | digest_uri |
Undocumented |
Instance Variable | password |
Undocumented |
Instance Variable | username |
Undocumented |
Method | _calculateResponse |
Calculates response with given encoded parameters. |
Method | _gen_nonce |
Undocumented |
Method | _genResponse |
Generate response-value. |
Method | _parse |
Parses the server challenge. |
Method | _unparse |
Create message string from directives. |
Parameters | |
serv_type:unicode | An indication of what kind of server authentication is being attempted against. For example, u"xmpp". |
host:unicode | The authentication hostname. Also known as the realm. This is used as a scope to help select the right credentials. |
serv_name:unicode | An additional identifier for the server. |
username:unicode | The authentication username to use to respond to a challenge. |
password:unicode | The authentication password to use to respond to a challenge. |
Returns | |
str. | initial client response string. |
Parameters | |
challenge:str. | server challenge. |
Returns | |
str. | client response. |
Returns | |
bytes | The response field of a response to a Digest-MD5 challenge of the given parameters. |
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.
Parses the server challenge.
Splits the challenge into a dictionary of directives with values.
Returns | |
dict of str to str. | challenge directives and their values. |