I was trying the following approach to load user profile:
I tried to override the queryForAuthenticationInfo adding the following
code:

Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
UserProfile userProfile = new UserProfile();
userProfile = LdapUtil.loadProfile(ctx);
session.setAttribute( "userProfile", userProfile );

Basically, I put the profile in the user's session to be retrieved later if
necessary.

At the first time the login the profile was loaded. But after logout and
login again the profile wasn't loaded, maybe because I'm using the cache,
and the code isn't run in the second execution.

Anybody know where is the best place to implement this functionality?

Thanks in advance,

RĂ´mulo Cordeiro Lana  
Systems Analyst - Public Prosecutor of the State of Minas Gerais
IT Superintendent - Information Systems - System Architecture
Tel.: (+55 31) 33308340 - [email protected] 

--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/How-to-put-user-profile-in-Shiro-session-with-cache-enabled-tp6856044p6856044.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to