1 ---+ Package =TWiki::LoginManager::TemplateLogin=
3 This is a login manager that you can specify in the security setup section of
4 [[%SCRIPTURL{"configure"}%][configure]]. It provides users with a
5 template-based form to enter usernames and passwords, and works with the
6 PasswordManager that you specify to verify those passwords.
8 Subclass of TWiki::LoginManager; see that class for documentation of the
14 ---++ ClassMethod *new* <tt>($session,$impl)</tt>
16 Construct the TemplateLogin object
20 ---++ ObjectMethod *forceAuthentication* <tt>() -> boolean</tt>
22 method called when authentication is required - redirects to (...|view)auth
23 Triggered on auth fail
27 ---++ ObjectMethod *loginUrl* <tt>() -> $loginUrl</tt>
29 TODO: why is this not used internally? When is it called, and why
30 Content of a login link
34 ---++ ObjectMethod *login* <tt>($query,$twiki)</tt>
36 If a login name and password have been passed in the query, it
37 validates these and if authentic, redirects to the original
38 script. If there is no username in the query or the username/password is
39 invalid (validate returns non-zero) then it prompts again.
41 If a flag to remember the login has been passed in the query, then the
42 corresponding session variable will be set. This will result in the
43 login cookie being preserved across browser sessions.
45 The password handler is expected to return a perl true value if the password
46 is valid. This return value is stored in a session variable called
47 VALIDATION. This is so that password handlers can return extra information
48 about the user, such as a list of TWiki groups stored in a separate
49 database, that can then be displayed by referring to
50 %<nop>SESSION_VARIABLE{"VALIDATION"}%