You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by John Moore <gr...@jmsd.co.uk> on 2013/05/07 22:50:08 UTC
SessionListeners in Grails app
I've implemented the Shiro SessionListener interface in my Grails app,
in order to handle session logout and expiration events. I'm pretty sure
I've configured things correctly so that my SessionListener is used. In
Bootstrap.groovy, where the rest of the Shiro stuff is configured, I
have this:
def sessionListener = new com.myapp.ShiroSessionListener()
shiroSecurityManager.sessionManager.sessionListeners?.add(sessionListener)
At the moment all my SessionListener does is logs onStart, onStop and
onExpiration. But unfortunately nothing is logged when I connect to the
web application, which means the SessionListener is not working. Is this
the correct way to configure it? Have I perhaps missed something? Just
to be clear, I am using Shiro native sessions.
I'm using the latest version of the plugin, 1.1.4, which uses Shiro 1.2.0.
John