Feature Proposal: Add logout handlers for LoginManagers

Motivation

Allow a LoginManager to respond to a logout request and perform non-Foswiki cleanup operations when a user logs out.

Description and Documentation

As of Foswiki 1.0.9, there really isn't any way for a LoginManager to be alerted that a logout is taking place. The _LOGOUT and _LOGOUTURL ClassMethods only generate the links a user clicks on to initiate a log out. The log out activity itself all takes place in the LoginManager base class with no opportunity for an extension to add or modify the actual logout processing.

Examples

Impact

LoginManager
edit

Implementation

-- Contributors: BryanThale - 18 May 2010

Discussion

I guess this request could be expanded into a general "Refactor the LoginManager API" request as there are some other oddities in the interface such as the login method from ApacheLogin & TemplateLogin

---++ ObjectMethod login( $query, $session )
sub login {
    my ( $this, $query, $session ) = @_;
[...]

Where other methods in the classes simply retrieve the session & query from the login manager's internal data structures.

---++ ObjectMethod forceAuthentication () -> boolean
sub forceAuthentication {
    my $this  = shift;
    my $session = $this->{session};
    my $query = $session->{request};
[...]

-- BryanThale - 18 May 2010

yup - rather than adding 'handlers' in the Plugins sense, I splitting up Foswiki::LoginManaager::loadSession into logical constituent parts for LoginManager implementations to over-rise makes sense.

there are at least 4 parts to it - load existing session, login, logoff, sudo

-- SvenDowideit - 18 May 2010

 
Topic revision: r5 - 19 Nov 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy