What is the equivalent Java configuration for the Spring Security tag?
Try to add @Component to your MyUsernamePasswordAuthenticationFilter class.
This annotation makes the class considered as candidates for auto-detection, see: @Component
For this:
You can add this:
.addFilter[Before|After](authenticationTokenProcessingFilter, UsernamePasswordAuthenticationFilter.class)
See: Standard Filter Aliases and Ordering