TWiki::Client
The package is also a Factory for login managers and also the base class for all login managers.
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, logins are not supported. If you want to authenticate users then you should consider TemplateLogin? or ApacheLogin? , which are subclasses of this class.
If you are building a new login manager, then you should write a new subclass
of this class, implementing the methods marked as VIRTUAL. There are already
examples in the lib/TWiki/Client
directory.
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.
This is a static method, but requires TWiki::cfg. It is designed to be run from a session or from a cron job.
Called when the user logs in. It's invoked from TWiki::UI::Register::finish for instance, when the user follows the link in their verification email message.
$login
- string login name
$wikiname
- string wikiname
DEPRECATED Use postRenderingHandler instead.
Add a cookie to the list of cookies for this session.
$c
- a CGI::Cookie
\%header
- header entries
$url
- target of the redirection.
VIRTUAL METHOD implemented by subclasses
Triggered by an access control violation, this method tests to see if the current session is authenticated or not. If not, it does whatever is needed so that the user can log in, and returns 1.
If the user has an existing authenticated session, the function simply drops though and returns 0.
VIRTUAL METHOD implemented by subclasses
Return a full URL suitable for logging in.
...
- url parameters to be added to the URL, in the format required by TWiki::getScriptUrl()
VIRTUAL METHOD implemented by subclasses
If there is some other means of getting a username - for example, Apache has remote_user() - then return it. Otherwise, return undef and the username stored in the session will be used.