Expected Behavior

UsernamePasswordAuthenticationFilter supports configuring AuthenticationManagerResolver, just like the BearerTokenAuthenticationFilter. Current Behavior

Context

I expect to dynamically retrieve the AuthenticationManager, for example, based on a parameter in the request. Let's consider a scenario where my user information is stored in different databases or tables. I want to obtain different AuthenticationManagers based on the request parameter, and then call different UserDetailsService implementations to retrieve user information.

Comment From: jzheaux

Thanks for the suggestion, @pop1213. Are you able to provide a PR to add that constructor? I believe it would be:

public BasicAuthenticationFilter(AuthenticationManagerResolver authenticationManagerResolver,
    AuthenticationEntryPoint authenticationEntryPoint) { 
    // ...
}