-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Session max age configuration in server and client. Removed hardcoded…
… value
- Loading branch information
Showing
12 changed files
with
151 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ | |
// @LogThis | ||
/** | ||
* The Class UserSessionManager. | ||
* | ||
* | ||
* @author [email protected] (Vicente J. Ruiz Jurado) | ||
*/ | ||
@Singleton | ||
|
@@ -67,7 +67,7 @@ public class UserSessionManagerImpl implements UsersOnline, UserSessionManager { | |
|
||
/** | ||
* Instantiates a new user session manager. | ||
* | ||
* | ||
* @param userManager | ||
* the manager | ||
* @param userSessionProv | ||
|
@@ -91,6 +91,9 @@ public UserSessionManagerImpl(final UserManager userManager, | |
final HashSessionManager hSessionManager = (HashSessionManager) jettySessionManager; | ||
hSessionManager.setMaxInactiveInterval(-1); | ||
hSessionManager.setSavePeriod(5); | ||
// See @ServerModule in wave for setMaxAge (cookie max age) and | ||
// "network.session_cookie_max_age" configuration parameter | ||
|
||
// Delete sessions with problems http://jira.codehaus.org/browse/JETTY-1484 | ||
hSessionManager.setDeleteUnrestorableSessions(true); | ||
hSessionManager.addEventListener(userSessionMonitor); | ||
|
@@ -102,7 +105,7 @@ public UserSessionManagerImpl(final UserManager userManager, | |
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* | ||
* @see cc.kune.core.server.UserSessionManager#getHashFromSession() | ||
*/ | ||
@Override | ||
|
@@ -132,7 +135,7 @@ private HttpSession getSessionFromHash(final String userHash) { | |
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* | ||
* @see cc.kune.core.server.UserSessionManager#getUser() | ||
*/ | ||
@Override | ||
|
@@ -148,12 +151,12 @@ public User getUser() { | |
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* | ||
* @see cc.kune.core.server.notifier.UsersOnline#isOnline(java.lang.String) | ||
*/ | ||
/* | ||
* (non-Javadoc) | ||
* | ||
* | ||
* @see cc.kune.core.server.UserSessionManager#isOnline(java.lang.String) | ||
*/ | ||
@Override | ||
|
@@ -169,7 +172,7 @@ public boolean isOnline(final String shortname) { | |
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* | ||
* @see cc.kune.core.server.UserSessionManager#isUserLoggedIn() | ||
*/ | ||
@Override | ||
|
@@ -184,7 +187,7 @@ public boolean isUserLoggedIn() { | |
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* | ||
* @see | ||
* cc.kune.core.server.UserSessionManager#isUserNotLoggedIn(java.lang.String) | ||
*/ | ||
|
@@ -195,7 +198,7 @@ public boolean isUserNotLoggedIn() { | |
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* | ||
* @see cc.kune.core.server.UserSessionManager#login(java.lang.Long, | ||
* java.lang.String) | ||
*/ | ||
|
@@ -208,7 +211,7 @@ public void login(final Long userId, final String newUserHash) { | |
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* | ||
* @see cc.kune.core.server.UserSessionManager#logout() | ||
*/ | ||
@Override | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
// TODO: Auto-generated Javadoc | ||
/** | ||
* The Class SessionConstants. | ||
* | ||
* | ||
* @author [email protected] (Vicente J. Ruiz Jurado) | ||
*/ | ||
public final class SessionConstants { | ||
|
@@ -64,10 +64,7 @@ public final class SessionConstants { | |
* the user is viewed as a newbie (so, more help is needed) | ||
*/ | ||
public final static long MIN_SIGN_IN_FOR_NEWBIES = 10; | ||
// session duration | ||
/** The Constant SESSION_DURATION. */ | ||
public final static long SESSION_DURATION = A_DAY * 30; // four weeks login | ||
// public final static long SESSION_DURATION = 10000; // For test | ||
|
||
/** The Constant USERHASH. */ | ||
public final static String USERHASH = "k007userHash"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.