Implementing authentication filters, login success, and failure handlers
The previous recipe taught us how to create a custom authentication manager and a chain of providers that can help control the different gateways of authentication and authorization processes. Now, we will expand on customization, covering the setup of a filter stack and its handlers.
Getting started
This recipe will create a security model out of Spring Security 4.2.2, where there is a filter chain of security transactions which includes all the managers and providers of the previous recipe, with the addition of security objects called handlers. This recipe is the most important part of this chapter when it comes to stretching the flexibility of the security architecture of the Spring Security framework.
How to do it...
Let us now add important supporting components to the authentication process established by the previous recipe:
- Create and apply two filters needed to establish a security filter chain in this new security...