Skip to content

Commit

Permalink
Merge pull request #2 from avdata99/allow_skipping_logout
Browse files Browse the repository at this point in the history
Allow skipping logout
  • Loading branch information
avdata99 authored Jul 31, 2024
2 parents 0f559d4 + e738d36 commit 4ffc090
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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
9 changes: 6 additions & 3 deletions ckanext/saml2auth/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@ def _perform_slo():

response = None

client = h.saml_client(
sp_config()
)
config = sp_config()
if config.get('logout_expected_binding') == 'skip-external-logout':
log.debug('Skipping external logout')
return

client = h.saml_client(config)
saml_session_info = get_saml_session_info(session)
subject_id = get_subject_id(session)

Expand Down

0 comments on commit 4ffc090

Please sign in to comment.