At my project I use Spring Security and GWT with url-like internationalization (http://….html?locale=en). Login and logout functions work very well, but here is another hitch: when user login he got localization-like URL (for example http://localhost:8000/Admin/app/Admin.html?locale=en) but after he close window (without logout) and coming back at URL http://localhost:8000/Admin/ he take authorization by Spring Security with session and login at system without “?locale=” param, so he got default language.
The main question is – how can I interrupt between two process (after Spring say – “Ok! it a good user – comin!” and before he throw user a link to coming) so that I can add locale to his URL ?
Thanks.
You can implement a custom
AuthenticationSuccessHandlerto add parameters to the request on authentication success. See this question.