View Full Version : pass extra parameter through spring security authentication
Apr 6th, 2010, 11:16 PM
just tried out the spring security, i finished following the guide and everything works fine.
but i have a problem here, if inside the login page i have same extra parameter for example languague. and i would like to store the languague into session. do you guys have any idea on how to do it? i cant do it inside the login controller as, i got no control over that.............
thanks in advance.............
Apr 7th, 2010, 08:16 PM
Well, haven't run into this yet, but here are my two cents, I think that implementing a HandlerInterceptor will do the trick.
Check here http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-handlermapping-interceptor
What I'd do is extend your interceptor with HandlerInterceptorAdapter (as the sample there) and override preHandle. There you can grab your parameter and process it as you business logic dictates.
Apr 7th, 2010, 08:47 PM
Thanks a lot for the your reply and suggestion, i'll try it out :)
Apr 7th, 2010, 09:20 PM
wow, I'm afraid I pointed you into the wrong direction. Please take a look into this
But looks that filters have changed in spring-sec 3.0
Please accept my apologies if I pointed you into the wrong direction, hope this give you some more hints on how to solve it
Apr 8th, 2010, 05:04 AM
it's ok, no problem :)
i just briefly went though the latest site suggest by you, it's information looks so useful and helpful.......... thank you once again :)
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.