Hi,
I am trying to use Shiro with guice in my webapp, I have extended the class
ShiroWebModule.
So far i have setup everything i needed (Cache manager, reaml etcetc) via
configureShiroWeb().
like:
@Override protected void configureShiroWeb() {
bind(MyReaml.class);
bind(MyCookie.class);
bind(MyManager.class);
bind(MySessionDao.class);
bind(MyCacheManager.class);
bind(MySessionValidationScheduler.class);
bind(SessionDAO.class).to(MyessionDao.class);
bind(SessionValidationScheduler.class).to(MySessionValidationScheduler.class);
bind(CacheManager.class).to(MyCacheManager.class);
bindRealm().to(MyReaml.class);
expose(WebSecurityManager.class);
expose(SecurityManager.class);
expose(FilterChainResolver.class);
expose(CacheManager.class);
}
Now I am trying to bind SimpleSession (because i want to extent the 30m
session).
so far what i did is:
@Override protected void bindSessionManager(AnnotatedBindingBuilder<
SessionManager> bind) {
bind.to(DefaultWebSessionManager.class);
bind(DefaultWebSessionManager.class).to(DefaultWebSessionManager);
bind(Cookie.class).to(MyCookie.class);
SimpleSession s = new SimpleSession();
s.setTimeout(TimeUnit.DAYS.toMillis(365));
bind(SimpleSession.class).toInstance(s);
}
But with no luck, i still get: SimpleSession:290 - Session with id [XXX]
has expired. Last access time: 11/18/15 9:06 PM. Current time: 11/18/15
9:37 PM. Session timeout is set to 1800 seconds (30 minutes)
What should I do?