Use different AuthenticationProvider depending on username and remote IP address
问题 In a Spring Security 3.2 based application I need to authenticate users against two different providers, based on a certain pattern in their username AND their remote ip address. In case they match certain rules, they should be authenticated against an ActiveDirectoryLdapAuthenticationProvider , otherwise with a standard AuthenticationProvider using an already exisiting custom implementation of UserDetailsService . What do I need to extend ? AuthenticationManager or AuthenticationProvider ?