Is it possible to have to have UserDetailsService implementations in a single web application ? To be more precise, my requirement is I have a Servlet which listens to http POST
I am not sure how nested authentication may be implemented with Spring Security. But you can have two separate UserDetailsService
implementations. Consider case when you have two types of URLs /**
and /admin/**
, and they can be used by two separate groups of users. Starting from Spring Security 3.1 you can use multiple http tags (see corresponding documentation):
...
...
You can even declare different entry points for each http tag using entry-point-ref attribute.