keycloak login page toggle

Hello:

I have a requirement for a toggle in the login page, between 2 categories

If user chooses category 1, ldap should be used for auth, If user chooses category 2, AD should be used for auth.

Finally to be redirected to the same client application.

Is it possible with keycloak? Does it require development?

Any directions will help.

I don’t find info in keycloak documentation.

Thanks in advance.

Vidhya

This is not supported out of the box, but you can implement a new Authenticator. I imagine you can extend the UsernamePasswordForm. If you traced the code you will find that the current implementation loads the storage providers sorted by priority and tries them one after the other until one succeeds.
Your implementation should override the method “action” and load the ldap // Active directory based on a request parameter.

For more info check
https://www.keycloak.org/docs/latest/server_development/index.html#_auth_spi_walkthrough

thanks you… I will try out