cherrypy.lib.auth

Functions

cherrypy.lib.auth.check_auth(users, encrypt=None, realm=None)

If an authorization header contains credentials, return True or False.

cherrypy.lib.auth.basic_auth(realm, users, encrypt=None, debug=False)

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.
cherrypy.lib.auth.digest_auth(realm, users, debug=False)

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.