How to customize Spring Security’s AuthenticationFailureHandler in a Spring Boot application?

We handle successful authentications by implementing the onAuthenticationSuccess() method of Spring Security’s AuthenticationSuccessHandler Interface. We write our own code to handle the activities and flow for successfully logged in users. Similarly we can handle the authentication failures using Spring Security’s AuthenticationFailureHandler Interface. Spring handles authentication failures and redirect users to the login page by itself […]

Continue Reading