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

Nils Christian Ehmke nils at rhocas.de
Sat Oct 19 02:52:39 EDT 2019


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


More information about the keycloak-user mailing list