0

Migrating from Wildfly 18 + Keycloack adapter, to Wildfly 26 w/ build-in OIC support.

Previously, to allow Sign-Out (I mean really Signing out from Keycloack, not just invalidating the session) I fetched the token from the session attributes and added to the logout URL (see below. That was tied to wildfly server, but it worked).

How do I get the OIC token in Wildfly 26 ?

org.keycloak.KeycloakSecurityContext securityContext = (org.keycloak.KeycloakSecurityContext) request.getAttribute(KeycloakSecurityContext.class.getName()); 
String token = securityContext.getIdTokenString();
Rob
  • 14,746
  • 28
  • 47
  • 65
lo-ran
  • 9
  • 2

1 Answers1

0

Got it, use org.wildfly.security.http.oidc.OidcSecurityContext

instead of wildfly-elytron-http-oidc-1.19.0.Final.jar

blackraven
  • 5,284
  • 7
  • 19
  • 45
lo-ran
  • 9
  • 2