Hello Kalle,

Thanks for the suggestion, I will look in that direction.
Yes, I know about the session listener - but with grails, session isnt created 
when user is identified, it would already exist at that time.


It would have been great if shiro provided the built in mechanism by events or 
some how - I believe many apps may benefit.

Thanks    
Sudhir 
 


________________________________
 From: Kalle Korhonen <[email protected]>
To: [email protected] 
Sent: Monday, 18 June 2012 10:42 PM
Subject: Re: execute code when remembered user returns ?
 
On Mon, Jun 18, 2012 at 9:18 AM, Sudhir N <[email protected]> wrote:
> Is there any way to get notified when a remembered user returns - ?
> When using shiro in servlet containers, session listeners aren't a solution
> ..  they won't trigger when a remembered user is associated with a session.

Well, a session listener is triggered when a session is created (or
destroyed). Of course it doesn't help you much with rememberme if the
session is already created for that user. One of the easiest options
is to create your own SubjectFactory
(http://shiro.apache.org/static/current/apidocs/org/apache/shiro/mgt/SubjectFactory.html).
SubjectFactory.createSubject(..) is invoked when a user is identified.

Kalle

Reply via email to