View Full Version : How to make User object available in HttpSession
Dec 17th, 2007, 03:13 AM
I need some help in making the User object in http session. I want to maintain the User object through out the http session till user logs out from the application.
Please do response & reply to this mail ASAP...
Dec 17th, 2007, 07:02 AM
I'm not sure I understand what you are getting at, Acegi stores information in the session anyway.
Dec 17th, 2007, 07:14 AM
Hi Karl Moore,
Thanks for the reply, even I want to know the same. I am using DAO Authentication, actually I need to pass and maintain the User Credential across all the modules in my application till user logs out from the application. I need help, that how to retrieve the user information in action after user login. I am able to do in the jsp using <authz:authentication /> tag. I want to do this actions. Whats the best way...
As I am not understanding how to pick user information from http session in action, I requested. Can you please help me further in doing so...
Dec 17th, 2007, 08:15 AM
It sounds like you want a custom user object in Thread.local via ACEGI.
See if this helps:
Dec 17th, 2007, 09:18 PM
I could able to retrive user data in jsp using <authz:authentication /> tag.
My question is how to retrieve the same data in actions...
Dec 19th, 2007, 02:18 AM
SecurityContext securityContext = SecurityContextHolder.getContext();
Authentication auth = securityContext.getAuthentication();
Object user = auth.getPrincipal();
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.