Spring security - Custom AuthenticationProvider not working - Java Config
Probably you missed the following method in your WebSecurityConfigurerAdapter:
@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
}
The same happened to me.