In Keycloak's account-linking documentation, there's a code snippet:
KeycloakSecurityContext session = (KeycloakSecurityContext) httpServletRequest.getAttribute(KeycloakSecurityContext.class.getName())
Why would the KeycloakSecurityContext
be set in the httpServletRequest
? Where does this code should run? In what context? Thanks.