Custom Authentication Filter with Spring Security
After answering a question on stackoverflow about how to configure Spring Security with your own authentication mechanism I’d like to go into more details in this post. I’ll implement a simple use case where the actual authentication is done by reading the username and password from the header of a request.
Let’s first have a look in a successful test to understand how we do our authentication: