Hi there,
currently there is no "clean" way to do this. Nexus uses Shiro and it's default sessionTimeout (which is 30minutes).
But, from code, you could do something like below (is dirty): grab the SecuritySystem component
@Requirement
private SecuritySystem securitySystem;
and then use the code:
((AbstractSessionManager)((DefaultSecurityManager)securitySystem.getSecurityManager()).getSessionManager()).setGlobalSessionTimeout( XXX );
See Shiro Javadoc for net effect:
Also, as Javadoc states, you can do this per-session too, similarly like this:
final Subject subject = ThreadContext.getSubject();
final Session subjectSession = subject.getSession( false );
if (subjectSession != null) {
subjectSession.setTimeout( XXX );
}
You have to be careful, as Nexus (since 1.9, but properly since 2.1 as Shiro was bumped to 1.2 featuring the noSessionCreation filter) explicitly sets "no session" for some clients... so be careful about session creation.
But i'd step back first: why and to what value you want to modify the session timeout?
Thanks,
~t~