[keycloak-user] [Authorization] Get user roles from token
Bill Burke
bburke at redhat.com
Sun Dec 6 21:53:49 EST 2015
For Java HttpServletRequest.isUserInRole() works. If you typecast the
principal to KeycloakPrincipal you can obtain the AccessToken.
On 12/6/2015 5:39 PM, Pavel Maslov wrote:
> Hi everyone,
>
>
> Do Keycloak adapters support user authorization? I mean, of course they
> do :) For example, the API I have secured with Keycloak receives a
> Keycloak access token from the client. How can I validate the token
> (check user roles) in my code? I am interested in the Java (wildfly) and
> Javascript adapters.
>
> Manually I am using jwt.io <http://jwt.io> to check the token. I am just
> curious if the Keycloak adapters support smth similar out of the box.
>
> Thank you for your answers.
>
>
> Regards,
> Pavel Maslov, MS
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
More information about the keycloak-user
mailing list