I have a custom AuthenticationProvider (basically a POJO-based DAO UserDetailsService) that handles loading users from the Postgres DB. I've tried to configure Spring Security 3 to use this custom AuthenticationProvider and I simply cannot get it to use my custom provider.
I set a breakpoint on the "getProviders" method of ProviderManager and it is throwing an exception saying I don't have any AuthenticationProviders configured. This is hooey. I've tried configuring the ProviderManager using the namespace handler and using a straight bean configuration, using the special bean id of "org.springframework.security.authenticationManage r". In the debugger, the ProviderManager it's looking at is NOT the one I configured in my application context. If a ProviderManager has a parent set, why doesn't it bounce the call to getProviders up the chain? I can see that this other ProviderManager (that I didn't configure and appears to be created magically) is being configured with the ProviderManager I DID configure as the parent, but that doesn't make any difference because it's not using it to find the provider to use.
What am I doing wrong here? This seems like it should be a simple thing. All the messages on this forum that relate to a problem like this simply direct people to the documentation (which I've read 3 times), so I guess I'm the only one using a custom AuthenticationProvider and Spring 3 and having trouble getting it working?
I've tried configuring using beans like (authProvider is a bean that extends AbstractUserDetailsAuthenticationProvider):
Both configurations result in the exception:
java.lang.IllegalArgumentException: A list of AuthenticationProviders is required