1.2.7.5 Sign In Handler

class SignInHandler( manager, [cgi=None], [message=''], [encryption=None])

Used to automate the sign in process.

manager
An auth manager object

cgi
An alternative cgi.FieldStorage() object to be use instead of the default one.

message
The default error message to display before a user tires to sign in.

encryption
The encryption method being used to encrypt passwords in the database.

handle( )
If the user has been signed in returns None. Otherwise, returns a dictionary with two keys, 'form' containing the sign in form together with any error messages and 'message' a message explaining why the user couldn't be signed in.

The dictionary can then be combined with a template using %(form)s dictionary substitution to display an HTML page to the user.