Part of twisted.web._auth.digest View Source View In Hierarchy
Implements interfaces: twisted.web.iweb.ICredentialFactory
Parameters | algorithm | Case insensitive string specifying the hash algorithm to use. Must be
either 'md5' or 'sha' . 'md5-sess'
is not supported.
|
authenticationRealm | case sensitive string that specifies the realm portion of the challenge | |
Instance Variables | privateKey | A random string used for generating the secure opaque.
(type: str
) |
Class Variables | CHALLENGE_LIFETIME_SECS | The number of seconds for which an opaque should be valid. |
Method | __init__ | Undocumented |
Method | generateNonce | Create a random value suitable for use as the nonce parameter of a |
Method | generateOpaque | Generate an opaque to be returned to the client. This is a unique |
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 |
Returns | (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 or
None if the request was submitted over a channel where this
does not make sense.
| |
Returns | True if the opaque was successfully verified.
| |
Raises | error.LoginFailed | if opaque could not be parsed or contained the wrong
values.
|
Parameters | request | The IRequest to with access was denied and for the response
to which this challenge is being generated.
|
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. |