[keycloak-dev] Getting UserModel from inside AdminConsole.getMainPage() ?

Stian Thorgersen stian at redhat.com
Fri Sep 11 10:51:56 EDT 2015


There's no user when getting the index.html page - it's a html5 app so the token is retrieved by the js adapter, which is after index.html is loaded.

Why do you need a user there? Seems like you're doing something not right.

----- Original Message -----
> From: "Stan Silvert" <ssilvert at redhat.com>
> To: "keycloak-dev" <keycloak-dev at lists.jboss.org>
> Sent: Friday, 11 September, 2015 4:48:20 PM
> Subject: [keycloak-dev] Getting UserModel from inside	AdminConsole.getMainPage() ?
> 
> I need to get the current logged-in UserModel from inside this method:
> https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java#L266
> 
> I tried the same approach as the whoAmI() method, but
> authManager.authenticateBearerToken() returns null.   I guess the token
> is not set up yet?
> 
> Any ideas on an alternate way to get UserModel?
> 
> Stan
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> 


More information about the keycloak-dev mailing list