Commit 328a2806 authored by Clément OUDOT's avatar Clément OUDOT

Work on implementation of OIDC logout (#184)

parent 841f057c
......@@ -1135,7 +1135,7 @@ sub issuerForAuthUser {
my $state = $oidc_request->{'state'};
# Ask consent for logout
if ( $self->param('confirm') == 1 or $self->param('confirm') == 1 ) {
if ( $self->param('confirm') == 1 or $self->param('confirm') == -1 ) {
if ( $self->param('confirm') == 1 ) {
my $apacheSession = $self->getApacheSession($session_id);
$self->_deleteSession($apacheSession);
......@@ -1158,8 +1158,8 @@ sub issuerForAuthUser {
return PE_OK;
}
$self->info('<div>');
$self->info("Logout ?");
$self->info('<div class="oidc_logout_message">');
$self->info( '<h3>' . $self->msg(PM_OIDC_CONFIRM_LOGOUT) . '</h3>' );
$self->info('</div>');
$self->{activeTimer} = 0;
return PE_CONFIRM;
......
......@@ -191,6 +191,7 @@ use constant {
PM_OIDC_SCOPE_ADDRESS => 28,
PM_OIDC_SCOPE_PHONE => 29,
PM_OIDC_SCOPE_OTHER => 30,
PM_OIDC_CONFIRM_LOGOUT => 31,
};
# EXPORTER PARAMETERS
......@@ -222,7 +223,7 @@ our @EXPORT = qw( PE_IMG_NOK PE_IMG_OK PE_INFO PE_REDIRECT PE_DONE PE_OK
PM_CDC_WRITER PM_OPENID_RPNS PM_OPENID_PA PM_OPENID_AP PM_ERROR_MSG
PM_LAST_LOGINS PM_LAST_FAILED_LOGINS PM_OIDC_CONSENT PM_OIDC_SCOPE_OPENID
PM_OIDC_SCOPE_PROFILE PM_OIDC_SCOPE_EMAIL PM_OIDC_SCOPE_ADDRESS
PM_OIDC_SCOPE_PHONE PM_OIDC_SCOPE_OTHER
PM_OIDC_SCOPE_PHONE PM_OIDC_SCOPE_OTHER PM_OIDC_CONFIRM_LOGOUT
);
our %EXPORT_TAGS = ( 'all' => [ @EXPORT, 'import' ], );
......
......@@ -433,6 +433,7 @@ sub error_ro {
# * PM_OIDC_SCOPE_ADDRESS 28
# * PM_OIDC_SCOPE_PHONE 29
# * PM_OIDC_SCOPE_OTHER 30
# * PM_OIDC_CONFIRM_LOGOUT 31
sub msg_en {
use utf8;
......@@ -468,6 +469,7 @@ sub msg_en {
'Your address',
'Your phone number',
'Another information:',
'Do you want to logout?',
];
}
......@@ -505,6 +507,7 @@ sub msg_fr {
'Votre adresse',
'Votre numéro de téléphone',
'Une autre information :',
'Souhaitez-vous vous déconnecter&nbsp;?',
];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment