[keycloak-dev] KeycloakSecurityContext is always null
Maurício Giacomini Penteado
mauriciogiacomini at hotmail.com
Tue Oct 11 17:50:16 EDT 2016
Hello everyone,
I do not understanding how can I correctly use KeycloakSecurityContext on a Rest service to obtain access to keycloak tokens.
I tryed via httpServletRequest:
KeycloakSecurityContext session = (KeycloakSecurityContext) httpServletRequest.getAttribute(KeycloakSecurityContext.class.getName());
But, my KeycloakSecurityContext is always null.
I put the anotation @SecurityDomain("keycloak") on my class without success.
The authentication works perfectly but, the authorization is a problem. I am trying access to KeycloakSecurityContext to work with authorization.
If someone has a tip that can help me, please let me know.
Regards,
Mauricio.
More information about the keycloak-dev
mailing list