Package cherrypy :: Package lib :: Module auth
[hide private]
[frames] | no frames]

Module auth

source code

Functions [hide private]
 
check_auth(users, encrypt=None, realm=None)
If an authorization header contains credentials, return True, else False.
source code
 
basic_auth(realm, users, encrypt=None, debug=False)
If auth fails, raise 401 with a basic authentication header.
source code
 
digest_auth(realm, users, debug=False)
If auth fails, raise 401 with a digest authentication header.
source code
Variables [hide private]
  __package__ = 'cherrypy.lib'
Function Details [hide private]

basic_auth(realm, users, encrypt=None, debug=False)

source code 
If auth fails, raise 401 with a basic authentication header.

realm
    A string containing the authentication realm.
    
users
    A dict of the form: {username: password} or a callable returning a dict.
    
encrypt
    callable used to encrypt the password returned from the user-agent.
    if None it defaults to a md5 encryption.
    

digest_auth(realm, users, debug=False)

source code 
If auth fails, raise 401 with a digest authentication header.

realm
    A string containing the authentication realm.
users
    A dict of the form: {username: password} or a callable returning a dict.