[keycloak-user] Get user roles in AngularJS from WildFly adapter

Thorsten thorsten315 at gmx.de
Thu Apr 16 05:36:36 EDT 2015


So do I need to create two applications for the realm then? One for the
JAX-RS part with "Access Type" of "Bearer Only" and one for the Angular UI
with type "Public"?

2015-04-16 11:18 GMT+02:00 Stian Thorgersen <stian at redhat.com>:

>
>
> ----- Original Message -----
> > From: "Thorsten" <thorsten315 at gmx.de>
> > To: keycloak-user at lists.jboss.org
> > Sent: Thursday, April 16, 2015 11:05:46 AM
> > Subject: [keycloak-user] Get user roles in AngularJS from WildFly adapter
> >
> > I have a WAR application that packages some JAX-RS services and an
> AngularJS
> > UI talking to them. No classic HTML/JSF stuff at all.
> >
> > The app is running on WildFly and the Keycloak adapter with
> authentication is
> > already working and I can e.g. secure the JAX-RS endpoints with
> > @RolesAllowed etc.
> >
> > My question is now what the recommended way is to get user role
> information
> > in the AngularJS part of the app? Since the authentication is not done
> in JS
> > I don't think keycloak.js would work? Can/should the keycloak.js adapter
> get
> > combined with the WildFly adapter or is there a different way to get
> > something like kc.hasRealmRole() to work?
>
> Use keycloak.js to authenticate your AngularJS app
>
> >
> > Thanks
> >
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150416/70ac0e95/attachment.html 


More information about the keycloak-user mailing list