I have a similar setup and my solution was to extend the Provider and override retrieveUser() to perform both the LDAP lookup and the local DB lookup.

Just having one provider that did both checks seemed a little bit simpler than making a new kind of ProviderManager, but it might be nice if a future acegi ProviderManager provided that kind of flexibility.

--
Baba Buehler - [EMAIL PROTECTED] - Austin, Texas



Tyler Nelson <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

02/03/2006 10:39 AM

Please respond to
[email protected]

To
[email protected]
cc
Subject
[Acegisecurity-developer] LdapAuthenticationProvider and Chaining Providers





Hi all,
  I just switched to use the new LdapAuthenticationProvider instead my previous fork of the Acegi LDAP  sandbox provider, and I have to say the new stuff is very sexy. Good job guys!!
 
However I have a need to chain providers. I need to authenticate against a Active Directory tree first then I need to query user information from a local DB.
 
So this is the flow I need
  • Authenticate AD first
  • If AD authentication works then query the DB based in username (no password here)
  • If extra DB info is there for the user, authentication succeeded.
 
The provider manager seems to only need one provider to authenticate, not all . What would be the suggested way to handle this situation. besides extending ProviderManager?
 
Thanks for your help,
   Tyler

Reply via email to