I'd like to authenticate users using both JDBC and LDAP connections. In the database I have usernames, roles, and a flag indicating if the user is allowed to log in.
NAME | ROLE | ALLOWED
user1 | r1 | 1
user2 | r1 | 0
user3 | r4 | 1
The LDAP server has the passwords.
I'd like to have the following authentication: If the user is in the database and the allowed
flag is 1
, then ask the LDAP server for authentication. Is it possible?