[keycloak-user] Spring + keycloak - cannot get auth username

Sebastien Blanc sblanc at redhat.com
Thu Dec 15 11:11:24 EST 2016


Set "principal-attribute":"preferred_username" in your keycloak.json and
you should be able to get your username from the Principal object.


On Thu, Dec 15, 2016 at 4:53 PM, Ondra Pala <pala.ondra at gmail.com> wrote:

> Hello,
>
> Why I can´t get username of logged user? I can try get this information
> from Principal, HttpServletResponse ... but still null.
>
> Our application use for authentification Keycloak, after successfull login,
> user is redirect to another url (on the same server) in Java Spring MVC
> application.
>
> Thanks for your answers.
>
> Ondra
> _______________________________________________
> 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