I am using Spring Security 3.0.4. I have a bunch of web service which are protected by Spring Security. When I access them as an unauthenticated user, Spring Security redire
you need to
RequestMatcher
to determine which requests should get a 403 (AntPathRequestMatcher
may suffice in your case).HttpSessionRequestCache
to check the matcher and not store those pages for post-login redirect.DelegatingAuthenticationEntryPoint
to either 403 the request outright or redirect to login according to the matcher.See the example here:
http://distigme.wordpress.com/2012/11/01/ajax-and-spring-security-form-based-login/