[keycloak-user] Recommended way for a custom login page

Nils Christian Ehmke nils at rhocas.de
Thu Oct 24 12:16:31 EDT 2019


Hi,

I am still confused about the topic and need stil some help. I can of 
course perform the actual POST request and retrieve both the 
authentication token as well as the refresh token. Can I somehow add 
those information as cookies which would be recognized during the next 
request by the Keycloak Java Adapter in my application? Or is the SSO 
mechanism way more complicated and can only be performed by the keycloak 
application?

Thanks and best regards,

   Nils

Am 19.10.2019 um 08:52 schrieb Nils Christian Ehmke:
> Hi,
>
> We are using Keycloak in a Spring Boot based application with Spring
> Security. Now we need to add the realm somehow dynamically to the
> request. As there is also the requirement to not use the default
> Keycloak login page I decided to add a custom made login page for this.
>
> My thoughts on this:
> * I can change the redirect to the login url by setting it at the
> KeycloakAuthenticationEntryPoint in the
> KeycloakWebSecurityConfigurerAdapter.
> * I could assemble the login url (with the realm) manually based on the
> user's input.
>
> But now I feel a little bit lost. Even if I perform the POST request to
> the Keycloak server, how do I announce this to the Keycloak Adapter and
> especially to Spring Security? Would I use the Javascript Adapter
> instead? Can I somehow use the existing Java Keycloak Adapter?
>
> Thanks for your help and best regards,
>
>     Nils
> _______________________________________________
> 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