<div dir="ltr">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"?</div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-16 11:18 GMT+02:00 Stian Thorgersen <span dir="ltr"><<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
----- Original Message -----<br>
> From: "Thorsten" <<a href="mailto:thorsten315@gmx.de">thorsten315@gmx.de</a>><br>
> To: <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
> Sent: Thursday, April 16, 2015 11:05:46 AM<br>
> Subject: [keycloak-user] Get user roles in AngularJS from WildFly adapter<br>
><br>
> I have a WAR application that packages some JAX-RS services and an AngularJS<br>
> UI talking to them. No classic HTML/JSF stuff at all.<br>
><br>
> The app is running on WildFly and the Keycloak adapter with authentication is<br>
> already working and I can e.g. secure the JAX-RS endpoints with<br>
> @RolesAllowed etc.<br>
><br>
> My question is now what the recommended way is to get user role information<br>
> in the AngularJS part of the app? Since the authentication is not done in JS<br>
> I don't think keycloak.js would work? Can/should the keycloak.js adapter get<br>
> combined with the WildFly adapter or is there a different way to get<br>
> something like kc.hasRealmRole() to work?<br>
<br>
</div></div>Use keycloak.js to authenticate your AngularJS app<br>
<br>
><br>
> Thanks<br>
><br>
> _______________________________________________<br>
> keycloak-user mailing list<br>
> <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</blockquote></div><br></div>