Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fix(ZNTA-634): change auth'd sessions timeout
Browse files Browse the repository at this point in the history
The value set to authenticated sessions is the largest value between the
configured authenticated session timeout and the anonymous session
timeout.
  • Loading branch information
Carlos A. Munoz committed Oct 2, 2015
1 parent 6e2d075 commit 32752c1
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -64,6 +64,8 @@
import com.google.common.collect.Sets;
import org.zanata.security.OpenIdLoginModule;

import static java.lang.Math.max;

@Name("applicationConfiguration")
@Scope(ScopeType.APPLICATION)
@Startup
Expand Down Expand Up @@ -422,7 +424,8 @@ public void setAuthenticatedSessionTimeout(
.getRequest()
.getSession()
.setMaxInactiveInterval(
authenticatedSessionTimeoutMinutes * 60);
max(authenticatedSessionTimeoutMinutes * 60,
defaultAnonymousSessionTimeoutMinutes * 60));
}

@Observer(LogoutEvent.EVENT_NAME)
Expand Down

0 comments on commit 32752c1

Please sign in to comment.