views:

19

answers:

1

In grails acegi plugin, you can specify the authenticationFailureUrl property in SecurityConfig.

Is there a way to get the url that caused the auth failure in the scope of the authenticationFailureUrl?

This is not as simple as just getting the request or looking on the params. If there is an auth failure, you get redirected to the authenticationFailureUrl, so the url on the request at that point is the authenticationFailureUrl, not the url that caused the auth failure.

Im my case, I set authenticationFailureUrl to be a controller method -- looking at everything in the debugger no solution is obvious to me....

Thanx in advance.

+1  A: 

The SavedRequest representing the original request is stored as a session attribute with name specified by the constant DefaultSavedRequest.SPRING_SECURITY_SAVED_REQUEST_KEY (or AbstractProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEY in pre-3.0 versions).

axtavt
thanx man, that is exactly it.
hvgotcodes