powered by Jive Software

Combining the DefaultAuthProvider with a custom UserProvider

I’‘ve run into a very strange situation using a custom AuthProvider and a custom UserProvider. Here’‘s what I’'d like to do:

  1. Use the DefaultAuthProvider to attempt authentication.

  2. If it succeeds, load the user using the DefaultUserProvider.

  3. If it fails, attempt to authenticate using my custom AuthProvider (which uses SOAP to authenticate against a remote system).

  4. If is succeeds, load the user from my custom UserProvider (which uses SOAP to load the user from a remote system).

I almost have this working using the HybridAuthProvider, however there doesn’‘t seem to be a way to couple the DefaultAuthProvider with the DefaultUserProvider. In other words, I can successfully authenticate using the DefaultAuthProvider, but then Wildfire uses my custom UserProvider to load the user. This doesn’'t make sense to be because users should either be on system or the other, not in both. Am I doing something wrong?

Thanks,

Christian

Christian,

Why not have your custom user provider try to first load the user using the default logic and then if that faild, load the user a custom way? In the future, it might be helpful to have a HybridUserProvider, though. The HybridAuthProvider is a bit half-baked as it is…

Regards,

Matt

Thanks. I’'ll try your suggestion and see how it works. I think a HybridUserProvider is the ultimately the way to go, however. I supposed I could always write my own.

Thanks again,

Christian