Package wsgitools :: Module middlewares :: Class DictAuthChecker
[hide private]
[frames] | no frames]

Class DictAuthChecker

source code


Verifies usernames and passwords by looking them up in a dict.

Instance Methods [hide private]
 
__init__(self, users)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
bool
__call__(self, username, password, environ)
check_function interface taking username and password and resulting in a bool.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, users)
(Constructor)

source code 

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

Parameters:
  • users ({str: str}) - is a dict mapping usernames to password.
Overrides: object.__init__

__call__(self, username, password, environ)
(Call operator)

source code 

check_function interface taking username and password and resulting in a bool.

Parameters:
  • environ ({str: object})
  • password (str)
  • username (str)
Returns: bool