Patrik B
unread,Jun 10, 2025, 8:51:15 AMJun 10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WildFly
I'm using OIDC.json in my three WAR it's setted this way (same in every WAR for SSO):
{
"realm": "${keycloak.realm}",
"auth-server-url": "${keycloak.auth.server.url}",
"ssl-required": "none",
"resource": "common-web",
"token-store": "cookie",
"adapter-state-cookie-path": "/",
"token-signature-algorithm": "ES256",
"credentials": {
"secret": "xxxxx"
}
}
@Context
protected HttpServletRequest request;
@POST
@Path("/logout")
public Response logout(boolean isUserRequestedLogout) {
try {
request.logout();
request.getSession().invalidate();
} catch (ServletException e) {
log.error(e.getLocalizedMessage(), e);
}
return Response.ok(new ResponseWrapper<>(true)).build();
}
when request.logout() is called the RefreshableOidcSecurityContext logout(OidcClientConfiguration clientConfiguration) method calls Keycloak which loguts the active user session successfully. OidcCookieTokenStore global logout is called after that in OidcHttpFacade resetCookie(final String name, final String path) method is called but the inner lambda not called to setCookie(...) , so frontend COOKIE_STATE is still exists and frontend can call every endpoint.
What do I do wrong, why setCookie not called in the lambda expression?
It's works when I use SessionStore (logs out perfectly) instead of CookieStore, but whit Session store I can't manage to make SSO with the 3 WAR.