4

I already could add multiple authentication providers as mentioned in Adding multiple authenticaion providers. Now Spring will check in both LDAP and database for users.

However my use case is little different. I want to bind a authentication provider per a client, not check in all providers. Say for clients with clienti_d1 and client_id2 it will check users in LDAP and for client_id3 it will check database. Basically LDAP based authentication for internal apps and database based authentication for external apps.

POST /oauth/token for client_id1:secret1 => hit LDAP authentication
POST /oauth/token for client_id2:secret2 => hit DB authentication
Udara S.S Liyanage
  • 6,189
  • 9
  • 33
  • 34
  • Did you resolve your issue ? – user3529850 May 10 '18 at 10:48
  • @user3529850 yes, but in a different way. I created a custom grant type that check users in DB. Then client_id2 generates token using that grant type so users will be searched in DB. client_id1 generated token using password grant type so users will be searched in LDAP. – Udara S.S Liyanage May 11 '18 at 09:41
  • I have similar issue, can you please share the code ? – SHD Feb 19 '19 at 06:58

0 Answers0