Expected Behavior when use formlogin ,I need extends usernamePasswordAuthenticationFilteroverride obtainPassword method to Decrypt password Encrypt by login page. but when I customize usernamePasswordAuthenticationFilter, the formLoginConfigurer can`t work.
Current Behavior when I extends usernamePasswordAuthenticationFilteroverride obtainPassword method, I must set all config of formLoginConfigurer once.
Context if the formLoginConfigurer support set the filter, I can set my customize extends usernamePasswordAuthenticationFilter
Comment From: jzheaux
Thanks for the suggestion, @javasingle.
This is by design. fromLogin, httpBasic, oauth2ResourceServer, etc. construct a filter for you. If you want to construct a filter yourself, then please use addFilter.
Alternatively, you can use objectPostProcessor which will allow you to take the DSL-constructed filter and wrap it in your own filter.