Load correct authentication module for authLogout (#LEMONDLAP-19)

This commit is contained in:
Clément Oudot 2010-09-03 15:23:08 +00:00
parent 8663fd29e9
commit 82b4ea080e

View File

@ -1392,8 +1392,20 @@ sub controlExistingSession {
}
}
# Call authentication logout
# Call logout for the module used to authenticate
if ( $h->{'_auth'} ne $self->get_module('auth') ) {
$self->loadModule(
"Lemonldap::NG::Portal::Auth" . $h->{_auth} );
eval {
$self->{error} =
$self->_sub( "Lemonldap::NG::Portal::Auth"
. $h->{_auth}
. "::authLogout" );
};
}
else {
eval { $self->{error} = $self->_sub('authLogout'); };
}
if ($@) {
$self->lmLog( "Error when calling authLogout: $@",
'debug' );
@ -1401,7 +1413,7 @@ sub controlExistingSession {
return $self->{error} if $self->{error} > 0;
# Collect logout services and build hidden iFrames
if ( defined $self->{logoutServices} ) {
if ( %{ $self->{logoutServices} } ) {
$self->lmLog(
"Create iFrames to forward logout to services",