Package wsgitools :: Module digest :: Class AuthDigestMiddleware
[hide private]
[frames] | no frames]

Class AuthDigestMiddleware

source code

Middleware partly implementing RFC2617. (md5-sess was omited)

Instance Methods [hide private]
 
__init__(self, app, gentoken, maxage=300, maxuses=5, store=None) source code
 
__call__(self, environ, start_response)
wsgi interface
source code
 
auth_response(self, credentials, reqmethod)
internal method generating authentication tokens
source code
 
authorization_required(self, environ, start_response, stale=False)
internal method implementing wsgi interface, serving 401 page
source code
Class Variables [hide private]
  algorithms = {"md5": lambda data: md5(data).hexdigest()}
Method Details [hide private]

__init__(self, app, gentoken, maxage=300, maxuses=5, store=None)
(Constructor)

source code 
Parameters:
  • app - is the wsgi application to be served with authentification.
  • gentoken (str -> (str or None)) - has to have the same functionality and interface as the AuthTokenGenerator class.
  • maxage (int) - deprecated, see MemoryNonceStore or StatelessNonceStore
  • maxuses (int) - deprecated, see MemoryNonceStore
  • store (NonceStoreBase) - a nonce storage implementation object. Usage of this parameter will override maxage and maxuses.

auth_response(self, credentials, reqmethod)

source code 

internal method generating authentication tokens

Raises:
  • KeyError
  • ValueError