| On it's own, an object of this class is used when you specify 'none' in
the security setup section of |
|
< < | configure. When it is used, |
> > | configure. When it is used, |
| logins are not supported. If you want to authenticate users then you should
consider TemplateLogin? or ApacheLogin? , which are subclasses of this class. |
| let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled. |
|
> > | Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
- If sessions are in use, it loads CGI::Session but doesn't initialise the session yet.
- Creates the login manager object
Slightly later in TWiki::new, loginManager->loadSession is called.
- Calls loginManager->getUser to get the username before the session is created
- TWiki::Client::ApacheLogin looks at REMOTE_USER
- TWiki::Client::TemplateLogin just returns undef
- reads the TWIKISID cookie to get the SID (or the TWIKISID parameters in the CGI query if cookies aren't available, or IP2SID? mapping if that's enabled).
- Creates the CGI::Session object, and the session is thereby read.
- If the username still isn't known, reads it from the cookie. Thus TWiki::Client::ApacheLogin overrides the cookie using REMOTE_USER, and TWiki::Client::TemplateLogin always uses the session.
Later again in TWiki::new, plugins are given a chance to override the username found from the loginManager.
The last step in TWiki::new is to find the user, using whatever user mapping manager is in place. |
| ObjectData? twiki |
|
> > | |
| The TWiki object this login manager is attached to. |
| |
|
< < | StaticMethod makeClient ($twiki) -> $TWiki::Client |
> > | StaticMethod makeLoginManager ($twiki) -> $TWiki::Client |
| Factory method, used to generate a new TWiki::Client object
for the given session.
|
|
< < | |
> > | ObjectMethod loadSession ($defaultUser) -> $login |
| Get the client session data, using the cookie and/or the request URL.
Set up appropriate session variables in the twiki object and return
the login name. |
|
> > | $defaultUser is a username to use if one is not available from other
sources. The username passed when you create a TWiki instance is
passed in here. |
|
|
|
|
|
< < | Delete sessions that are sitting around but are really expired. |
> > | Delete sessions and passthrough files that are sitting around but are really expired. |
| This assumes that the sessions are stored as files.
This is a static method, but requires TWiki::cfg. It is designed to be |
|
|
|
> > | |
| Generate an HTTP redirect on STDOUT, if you can. Return 1 if you did. |
|
< < | Don't forget to pass all query parameters through. |
|
-
$url - target of the redirection.
|
| |
|
< < | ObjectMethod clearSessionValue ($name) |
> > | ObjectMethod clearSessionValue ($name) -> $boolean |
| Clear the value of a session variable.
We do not allow setting of AUTHUSER. |