logout_possible = True
login_inputs = ['username', 'password']
- def __init__(self, name='mysql', dbhost=None, dbuser=None, dbpass=None, dbname=None, dbport=None, verbose=False):
+ def __init__(self, name='mysql', dbhost=None, dbuser=None, dbpass=None, dbname=None, dbport=None, verbose=False, hint=None):
"""
Authenticate using credentials from a mysql database
+
+ The name parameter should be unique among all authentication methods.
+
+ The hint parameter is a snippet of HTML that is displayed below the login form.
"""
self.verbose = verbose
self.dbhost = dbhost
self.dbname = dbname
self.dbport = dbport
self.name = name
+ self.hint = hint
def check_login(self, request, username, password):
""" Checks the given username password combination. Returns the
request.log(''.join(traceback.format_exception(*info)))
return ContinueLogin(user_obj)
+ def login_hint(self, request):
+ """ Return a snippet of HTML that is displayed with the login form. """
+ return self.hint
+
# vim: set sw=4 expandtab sts=4:vim