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(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user