[keycloak-user] Login to Keycloak using API and create KeycloakPrincipal object
Stian Thorgersen
sthorger at redhat.com
Mon Oct 10 04:23:37 EDT 2016
By using token directly I assume you mean exchanging username/password for
a token directly. I'd strongly recommend against this and it's not
something our adapters support directly.
On 4 October 2016 at 15:36, Mariusz Chruscielewski - Info.nl <
mariusz at info.nl> wrote:
> Hi. We are using Keycloak Tomcat Adapter to secure our webapp, after we
> access protected resource we are redirected to keycloak and after login we
> go back to our app. After that, we can get KeycloakPrincipal object from
> web context (request).
>
> Is there a way to create / get this object without using Tomcat Adapter ?
> We want to make API call (like http://keycloak/auth/realms/
> vi/protocol/openid-connect/token) and get (or create manually) this
> object using AccessTokenResponse (or any other object we can get from API).
>
> Ultimate goal is to login to keycloak like adapter does, but directly from
> Java, without any interaction from user on keycloak forms.
>
> Is it even possible?
>
> Kind Regards,
>
> Mariusz Chruscielewski
>
>
>
> _______________________________________________
> 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