Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidate Session during a SAML2 based SSO logout #3591

Open
wants to merge 1 commit into
base: 4.4.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@ protected static boolean handleLogout(CarbonUIAuthenticator authenticator,
// This condition is evaluated when users are logged out in SAML2 based SSO
if (request.getAttribute("logoutRequest") != null) {
log.debug("Loging out from SSO session");

try {
invalidateSession(session);
} catch (Exception ignored) {
// Ignore exception when invalidating and invalidated session
if (log.isDebugEnabled()) {
log.debug("Error in invalidating frontend session ", ignored);
}
}
response.sendRedirect(contextPath + "/carbon/sso-acs/redirect_ajaxprocessor.jsp?logout=true");
return false;
}
Expand Down