I have a login form with username and password. Now, I want to another field (I call switch field), this field helps users can switch between 2 login Provider in Spring security (I mean that user input username and password, then choose the way to authenticate - LDAP or Database)
I have 2 authentication-manager like below
<security:authentication-manager alias="ldapAuthenticationManager">
<security:authentication-provider
ref="ldapAuthProvider" />
</security:authentication-manager>
<security:authentication-manager id="dBAuthenticationManager">
<security:authentication-provider
user-service-ref="userDetailsService">
</security:authentication-provider>
</security:authentication-manager>
I do not know how to catch the extra param (switch field) and switch between 2 Provider above.
I am very stuck in this case. Thanks.