Skip to content

Commit 9808638

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

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

front/logout.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,15 @@
4343

4444
if (
4545
$CFG_GLPI["ssovariables_id"] > 0
46-
&& ((string) $CFG_GLPI['ssologout_url']) !== ''
46+
&& strlen($CFG_GLPI['ssologout_url']) > 0
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 (

locales/pt_BR.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7960,6 +7960,10 @@ msgstr "Outra autenticação enviada na requisição HTTP"
79607960
msgid "SSO logout url"
79617961
msgstr "SSO URL de logout"
79627962

7963+
#: templates/pages/setup/authentication/other_ext_setup.html.twig
7964+
msgid "Use Front-Channel Logout from SSO"
7965+
msgstr "Usar Front-Channel Logout pelo SSO"
7966+
79637967
#: templates/pages/setup/authentication/other_ext_setup.html.twig
79647968
msgid "Remove the domain of logins like login@domain"
79657969
msgstr "Remover o domínio do logins na forma login@domínio"

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)