-
Oct 25th, 2010, 03:56 AM
#1
Filters and multiple authentication providers
Having implemented the suggestion in this thread, I need to understand why one provider's success results in total success when I want both providers to be checked and if both are successful then only is the user authenticated.
I think it has to do with the redirect on success, so I configured a SavedRequestAwareAuthenticationSuccessHandler to always redirect back to /j_spring_security_check but this behaves as expected and redirects to /j_spring_security_check and does not allow the second provider to process the request.
How do I get both filters/providers to work together?
-
Oct 25th, 2010, 07:03 AM
#2
Fixed with a quick hack extending the ldap provider and calling super manually when the fingerprints are valid.
If there's a more elegant solution I'd like to know about it, but it's no big deal anymore.
-
Oct 25th, 2010, 10:48 AM
#3
ProviderManager, the default AuthenticationManager implementation, performs an OR on each AuthenticationProvider. If you want to override this behavior you could write your own implementation that performs an AND on the AuthenticationProvider's. Of course you will want to ensure that you wire the custom AuthenticationManager in your config as well.
-
Oct 25th, 2010, 12:34 PM
#4
When someone suggested that I thought it was a more suspicious looking hack than the one I put in there.
I guess at the time it looked like 50 lines of code to moreorless copy/paste from doAuthentication.
Thanks for the tip no less, so I could reconsider it, may have to sort it in a future build.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules