File tree Expand file tree Collapse file tree
http/oidc/src/main/java/org/wildfly/security/http/oidc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ final class LogoutHandler {
4242 public static final String ID_TOKEN_HINT_PARAM = "id_token_hint" ;
4343 private static final String LOGOUT_TOKEN_PARAM = "logout_token" ;
4444 private static final String LOGOUT_TOKEN_TYPE = "Logout" ;
45+ private static final String CLIENT_ID_SID_SEPARATOR = "-" ;
4546 public static final String SID = "sid" ;
4647 public static final String ISS = "iss" ;
4748
@@ -99,7 +100,7 @@ boolean isSessionMarkedForInvalidation(OidcHttpFacade facade) {
99100 if (idToken == null ) {
100101 return false ;
101102 }
102- return sessionsMarkedForInvalidation .containsKey ( idToken .getSid ());
103+ return sessionsMarkedForInvalidation .remove ( getSessionKey ( facade , idToken .getSid ())) != null ;
103104 }
104105
105106 private void redirectEndSessionEndpoint (OidcHttpFacade facade ) {
@@ -170,7 +171,11 @@ private void handleBackChannelLogoutRequest(OidcHttpFacade facade) {
170171 }
171172
172173 log .debug ("Marking session for invalidation during back-channel logout" );
173- sessionsMarkedForInvalidation .put (sessionId , facade .getOidcClientConfiguration ());
174+ sessionsMarkedForInvalidation .put (getSessionKey (facade , sessionId ), facade .getOidcClientConfiguration ());
175+ }
176+
177+ private String getSessionKey (OidcHttpFacade facade , String sessionId ) {
178+ return facade .getOidcClientConfiguration ().getClientId () + CLIENT_ID_SID_SEPARATOR + sessionId ;
174179 }
175180
176181 private void handleFrontChannelLogoutRequest (OidcHttpFacade facade ) {
You can’t perform that action at this time.
0 commit comments