Skip to content

Commit

Permalink
Allow skip logout
Browse files Browse the repository at this point in the history
  • Loading branch information
avdata99 committed Jul 23, 2024
1 parent b2c6cfc commit 6d14a80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ Optional:
# Saml logout request preferred binding settings variable
# Default: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
ckanext.saml2auth.logout_expected_binding = urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
# If you don't want to logout from external source you can use
ckanext.saml2auth.logout_expected_binding = skip-external-logout

# Default fallback endpoint to redirect to if no RelayState provided in the SAML Response
# Default: user.me (ie /dashboard)
Expand Down
6 changes: 5 additions & 1 deletion ckanext/saml2auth/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ def update_config(self, config_):

def logout(self):

response = _perform_slo()
config = sp_config()
if config.get('logout_expected_binding') == 'skip-external-logout':
response = None
else:
response = _perform_slo()

if response:
domain = h.get_site_domain_for_cookie()
Expand Down

0 comments on commit 6d14a80

Please sign in to comment.