Unauthenticated logout (#2342)
This commit is contained in:
parent
2d2bcac4a7
commit
b2306cc8ad
|
@ -179,6 +179,24 @@ sub checkLogout {
|
|||
PE_OK;
|
||||
}
|
||||
|
||||
sub checkUnauthLogout {
|
||||
my ( $self, $req ) = @_;
|
||||
if ( defined $req->param('logout') ) {
|
||||
$req->pdata({});
|
||||
$req->addCookie(
|
||||
$self->cookie(
|
||||
name => $self->conf->{cookieName},
|
||||
domain => $self->conf->{domain},
|
||||
secure => $self->conf->{securedCookie},
|
||||
expires => 'Wed, 21 Oct 2015 00:00:00 GMT',
|
||||
value => 0
|
||||
)
|
||||
);
|
||||
$req->steps( [ sub { PE_LOGOUT_OK } ] );
|
||||
}
|
||||
PE_OK;
|
||||
}
|
||||
|
||||
sub authLogout {
|
||||
my ( $self, $req ) = @_;
|
||||
my $res = $self->_authentication->authLogout($req);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#
|
||||
package Lemonldap::NG::Portal::Main::Run;
|
||||
|
||||
our $VERSION = '2.0.9';
|
||||
our $VERSION = '2.0.10';
|
||||
|
||||
package Lemonldap::NG::Portal::Main;
|
||||
|
||||
|
@ -133,10 +133,11 @@ sub login {
|
|||
return $self->do(
|
||||
$req,
|
||||
[
|
||||
'controlUrl', @{ $self->beforeAuth },
|
||||
$self->authProcess, @{ $self->betweenAuthAndData },
|
||||
$self->sessionData, @{ $self->afterData },
|
||||
$self->validSession, @{ $self->endAuth },
|
||||
'checkUnauthLogout', 'controlUrl', # Fix 2342
|
||||
@{ $self->beforeAuth }, $self->authProcess,
|
||||
@{ $self->betweenAuthAndData }, $self->sessionData,
|
||||
@{ $self->afterData }, $self->validSession,
|
||||
@{ $self->endAuth }
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -146,11 +147,11 @@ sub postLogin {
|
|||
return $self->do(
|
||||
$req,
|
||||
[
|
||||
'restoreArgs', 'controlUrl',
|
||||
@{ $self->beforeAuth }, $self->authProcess,
|
||||
@{ $self->betweenAuthAndData }, $self->sessionData,
|
||||
@{ $self->afterData }, $self->validSession,
|
||||
@{ $self->endAuth },
|
||||
'checkUnauthLogout', 'restoreArgs', # Fix 2342
|
||||
'controlUrl', @{ $self->beforeAuth },
|
||||
$self->authProcess, @{ $self->betweenAuthAndData },
|
||||
$self->sessionData, @{ $self->afterData },
|
||||
$self->validSession, @{ $self->endAuth }
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user