Skip to content

Commit

Permalink
core: Adjusted default session expiry to be 30.5 and 90.5 days forward
Browse files Browse the repository at this point in the history
This is to make it more likely that sessions expire during night-time
for the user, making it less likely that user is logged out while
working.
  • Loading branch information
cederberg committed Dec 15, 2024
1 parent f12eb72 commit cf56e1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/java/org/rapidcontext/core/type/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ public class Session extends StorableObject {
/**
* The expiry timeout (after last access) for logged in users (30 days).
*/
public static final long EXPIRY_AUTH_MILLIS = 30L * DateUtils.MILLIS_PER_DAY;
public static final long EXPIRY_AUTH_MILLIS =
30L * DateUtils.MILLIS_PER_DAY + 12L * DateUtils.MILLIS_PER_HOUR;

/**
* The maximum session age (90 days).
*/
public static final long MAX_AGE_MILLIS = 90L * DateUtils.MILLIS_PER_DAY;
public static final long MAX_AGE_MILLIS =
90L * DateUtils.MILLIS_PER_DAY + 12L * DateUtils.MILLIS_PER_HOUR;

/**
* The default active session time (5 minutes).
Expand Down

0 comments on commit cf56e1d

Please sign in to comment.