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

Class UpdatingHtdigestTokenGenerator

source code


Behaves like HtdigestTokenGenerator, checks the htdigest file for changes on each invocation.

Instance Methods [hide private]
 
__init__(self, realm, htdigestfile, ignoreparseerrors=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
str or None
__call__(self, user, algo='md5')
Generates an authentication token from a username.
source code

Inherited from HtdigestTokenGenerator: readhtdigest

Inherited from AbstractTokenGenerator: check_password

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]

Inherited from AbstractTokenGenerator: realm

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, realm, htdigestfile, ignoreparseerrors=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • htdigestfile - path to the .htdigest file
  • ignoreparseerrors - passed to readhtdigest
Raises:
  • IOError
  • ValueError
Overrides: object.__init__
(inherited documentation)

__call__(self, user, algo='md5')
(Call operator)

source code 

Generates an authentication token from a username.

Parameters:
Returns: str or None
a valid token or None to signal that authentication should fail
Overrides: AbstractTokenGenerator.__call__
(inherited documentation)