[keycloak-user] User Role(s) in Event

Marek Posolda mposolda at redhat.com
Mon Mar 5 23:18:17 EST 2018


You may lookup user (UserModel) by ID and then retrieve role mappings 
from it with user.getRoleMappings() .

Marek

On 05/03/18 13:28, vrinda nayak wrote:
> Hello All,
>
> For our dcm4che archive, we use Keycloak as an Authentification layer. We
> have built a custom Dcm4cheEventListenerProvider which implements
> Keycloak's EventListenerProvider to listen to the LOGIN and LOGOUT events.
> The Event class does not have roles of a user in the details. Based on
> role(s) of a user, we have to emit specific audit messages.
>
> Can someone please advise how we can extract the role(s) of a user when
> events are being listened?
>
> Thanks in advance.
>
> Best Regards
> Vrinda Nayak
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list