I have extended SavedRequestAwareAuthenticationSuccessHandler
to create a handler that keeps track of users logins etc by overriding onAuthenticationSuccess
. Unfortunately, it seems that the part of the URL after # is been stripped by the ExceptionTranslationFilter
that stores it in the session for usage after successfull login. This is a big problem for me since my app is heavy on Ajax and i am using the part of the url after # to mark app states and enable bookmarking as well as navigation using back/forward buttons etc.
Does anyone have any ideas?
Asked
Active
Viewed 855 times
1

nvrs
- 720
- 2
- 17
- 25
-
1Fragment part of URL is not sent to server. See http://stackoverflow.com/questions/940905/can-php-read-the-hash-portion-of-the-url, http://stackoverflow.com/questions/317760/how-to-get-url-hash-from-server-side and http://stackoverflow.com/questions/3664257/why-the-hash-part-of-the-url-is-not-in-the-server-side – Ritesh Jun 01 '12 at 15:56
-
2This is also covered in the [FAQ](http://static.springsource.org/spring-security/site/faq/faq.html#faq-matching-url-fragments) – Shaun the Sheep Jun 01 '12 at 19:24
-
Silly me, thanks for the answer. I got around this issue by storing the anchor part of the url in a cookie on the login page. This works since when the browser is redirected from the requested page to the login one the anchor part of the url persists. I guess this is the only way to solve this – nvrs Jun 18 '12 at 14:03