data/TWiki/TWikiLoginManagerTemplateLoginDotPm.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
     1 ---+ Package =TWiki::LoginManager::TemplateLogin=
     2 
     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.
     7 
     8 Subclass of TWiki::LoginManager; see that class for documentation of the
     9 methods of this class.
    10 
    11 
    12 %TOC%
    13 
    14 ---++ ClassMethod *new* <tt>($session,$impl)</tt>
    15 
    16 Construct the TemplateLogin object
    17 
    18 
    19 
    20 ---++ ObjectMethod *forceAuthentication* <tt>() -> boolean</tt>
    21 
    22 method called when authentication is required - redirects to (...|view)auth
    23 Triggered on auth fail
    24 
    25 
    26 
    27 ---++ ObjectMethod *loginUrl* <tt>() -> $loginUrl</tt>
    28 
    29 TODO: why is this not used internally? When is it called, and why
    30 Content of a login link
    31 
    32 
    33 
    34 ---++ ObjectMethod *login* <tt>($query,$twiki)</tt>
    35 
    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.
    40 
    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.
    44 
    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"}%
    51 
    52