Part of twisted.web2.auth.digest View Source View In Hierarchy
Implements interfaces: twisted.web2.auth.interfaces.ICredentialFactory
Instance Variables | privateKey | A random string used for generating the secure opaque. |
Class Variables | CHALLENGE_LIFETIME_SECS | The number of seconds for which an opaque should be valid. |
Method | __init__ | |
Method | generateNonce | Undocumented |
Method | generateOpaque | Generate an opaque to be returned to the client. |
Method | verifyOpaque | Given the opaque and nonce from the request, as well as the clientip |
Method | getChallenge | Generate the challenge for use in the WWW-Authenticate header |
Method | decode | Decode the given response and attempt to generate a |
Method | _getTime | Parameterize the time based seed used in generateOpaque |
Parameters | algorithm | case insensitive string that specifies the hash algorithm used, should be
either, md5, md5-sess or sha
(type: str
) |
realm | case sensitive string that specifies the realm portion of the challenge
(type: str
) |
Parameters | opaque | The opaque value from the Digest response |
nonce | The nonce value from the Digest response | |
clientip | The remote IP address of the client making the request | |
Returns | True if the opaque was successfully verified.
| |
Raises | error.LoginFailed | if opaque could not be parsed or contained the wrong values.
|
Parameters | peer | The IAddress of the requesting client.
|
Returns | The dict that can be used to generate a WWW-Authenticate
header.
|
DigestedCredentials
from it.Parameters | response | A string of comma seperated key=value pairs
(type: str
) |
request | the request being processed
(type: twisted.web2.server.Request
) | |
Returns | DigestedCredentials
| |
Raises | error.LoginFailed
if the response does not contain a username, a nonce, an opaque, or if the
opaque is invalid.
|