security:form-login
, since I have two things in my system where validation will be different, ie I would have to have more than authentication-provider
to perform queries on different tables.
security:form-login
, since I have two things in my system where validation will be different, ie I would have to have more than authentication-provider
to perform queries on different tables.
Good afternoon John
It is possible to have more than one authentication provider, in fact, as many as you want in the same application.
According to the documentation, it is possible to use existing providers in Spring Security and also create your custom ones. After creation, you need to register with an authentication-manager.
Ex:
<authentication-manager>
<authentication-provider ref="restAuthProvider/>
<authentication-provider ref="basicAuthProvider"/>
</authentication-manager>
<bean id="restAuthProvider" class="br.com.auths.RestAuthProvider">
</bean>
<bean id="basicAuthProvider" class="br.com.auths.BasicAuthProvider">
</bean>
Ref: link