Using both LDAP and DB authentication with Spring Security
|September 8, 2014||Posted by forumadmin under TechQns||
I have an application that is used by two sets of users-internal users for the the company and external customers.
I have to perform authentication for both sets of users.The application is to be built using Spring Security.
For internal user, LDAP AD authentication needs to done.And for external users, authentication is to be done from database. I am stuck here.
How can I use both types of authentication? The users can be differentiated based on their email IDs – for example, internal users will all have an email id ending with @company.com.
In spring security configuration, can it done like this?-
<authentication-manager> <authentication-provider> <ldap-authentication-provider....> <db-authentication-provider......> </authentication-provider> <authentication-manager>
Then should I write a filter (that comes before spring security’s filter) that selects users based on their login email IDs and directs them to the correct authentication manager? Is this redirection possible to be done here?
I am new to this.Thanks in advance.
|Asked By – DTnapaT||Read Answers|