Skip to content

Commit ead36c1

Browse files
committed
Use Front-Channel Logout from SSO
1 parent 0fbac5b commit ead36c1

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

front/logout.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@
4444
if (
4545
$CFG_GLPI["ssovariables_id"] > 0
4646
&& ((string) $CFG_GLPI['ssologout_url']) !== ''
47+
&& Session::isAuthenticated()
4748
) {
48-
Session::cleanOnLogout();
49-
Html::redirect($CFG_GLPI["ssologout_url"]);
49+
if (!$CFG_GLPI["useFrontChannelLogout"]) {
50+
Session::cleanOnLogout();
51+
}
52+
if (!$CFG_GLPI["useFrontChannelLogout"] || !isset($_GET['frontChannelLogout'])) {
53+
Html::redirect($CFG_GLPI["ssologout_url"]);
54+
}
5055
}
5156

5257
if (

templates/pages/setup/authentication/other_ext_setup.html.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@
8888
config['existing_auth_server_field_clean_domain'],
8989
__('Remove the domain of logins like login@domain')
9090
) }}
91+
{{ fields.dropdownYesNo(
92+
'useFrontChannelLogout',
93+
config['useFrontChannelLogout'],
94+
__('Use Front-Channel Logout from SSO')
95+
) }}
9196
{{ fields.textField('realname_ssofield', config['realname_ssofield'], __('Surname')) }}
9297
{{ fields.textField('firstname_ssofield', config['firstname_ssofield'], __('First name')) }}
9398
{{ fields.textField('comment_ssofield', config['comment_ssofield'], __('Comments')) }}

0 commit comments

Comments
 (0)