data/TWiki/TWikiLoginManagerTemplateLoginDotPm.txt
changeset 0 414e01d06fd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/TWikiLoginManagerTemplateLoginDotPm.txt	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +---+ Package =TWiki::LoginManager::TemplateLogin=
     1.5 +
     1.6 +This is a login manager that you can specify in the security setup section of
     1.7 +[[%SCRIPTURL{"configure"}%][configure]]. It provides users with a
     1.8 +template-based form to enter usernames and passwords, and works with the
     1.9 +PasswordManager that you specify to verify those passwords.
    1.10 +
    1.11 +Subclass of TWiki::LoginManager; see that class for documentation of the
    1.12 +methods of this class.
    1.13 +
    1.14 +
    1.15 +%TOC%
    1.16 +
    1.17 +---++ ClassMethod *new* <tt>($session,$impl)</tt>
    1.18 +
    1.19 +Construct the TemplateLogin object
    1.20 +
    1.21 +
    1.22 +
    1.23 +---++ ObjectMethod *forceAuthentication* <tt>() -> boolean</tt>
    1.24 +
    1.25 +method called when authentication is required - redirects to (...|view)auth
    1.26 +Triggered on auth fail
    1.27 +
    1.28 +
    1.29 +
    1.30 +---++ ObjectMethod *loginUrl* <tt>() -> $loginUrl</tt>
    1.31 +
    1.32 +TODO: why is this not used internally? When is it called, and why
    1.33 +Content of a login link
    1.34 +
    1.35 +
    1.36 +
    1.37 +---++ ObjectMethod *login* <tt>($query,$twiki)</tt>
    1.38 +
    1.39 +If a login name and password have been passed in the query, it
    1.40 +validates these and if authentic, redirects to the original
    1.41 +script. If there is no username in the query or the username/password is
    1.42 +invalid (validate returns non-zero) then it prompts again.
    1.43 +
    1.44 +If a flag to remember the login has been passed in the query, then the
    1.45 +corresponding session variable will be set. This will result in the
    1.46 +login cookie being preserved across browser sessions.
    1.47 +
    1.48 +The password handler is expected to return a perl true value if the password
    1.49 +is valid. This return value is stored in a session variable called
    1.50 +VALIDATION. This is so that password handlers can return extra information
    1.51 +about the user, such as a list of TWiki groups stored in a separate
    1.52 +database, that can then be displayed by referring to
    1.53 +%<nop>SESSION_VARIABLE{"VALIDATION"}%
    1.54 +
    1.55 +