Grails, SpringSecurity - disable redirection if not registered
1 answer
What you want to do is set up authenticationEntryPoint, which can usually be done in spring / resources.groovy. If you are having difficulty finding the notation in the Spring Security Core plugin documentation, but there is a discussion about Jira tickets that links to it:
https://github.com/alvarosanchez/grails-spring-security-rest/issues/51
In one of our projects, we wanted to submit a 403 response, so we added this line to the .groovy resources:
AuthenticationEntryPoint (org.springframework.security.web.authentication.Http403ForbiddenEntryPoint)
Hope it helps.
+1
source to share