[keycloak-user] How to obtain identity information from KeycloakSecurityContext
keycloak demo
testoauth55 at gmail.com
Mon Sep 24 05:52:11 EDT 2018
I want to provide access to a resource if the current user is the creator
of resource. So I want to extract identity information. I have
obtained *KeycloakSecurityContext
*and *AuthorizationContext *from the request.
KeycloakSecurityContext keycloakSecurityContext = (KeycloakSecurityContext)
request.getAttribute(KeycloakSecurityContext.class.getName());
AuthorizationContext authzContext =
keycloakSecurityContext.getAuthorizationContext();
*How can I obtain identity information like mentioned in EvaluationContext**
?*(
https://www.keycloak.org/docs/4.3/authorization_services/#using-the-authorizationcontext-to-obtain-an-authorization-client-instance
)?
More information about the keycloak-user
mailing list