From 3271d69fcb5a829904f3d8db7ff939e730dfe2b9 Mon Sep 17 00:00:00 2001 From: Athou Date: Wed, 4 Jan 2023 11:30:49 +0100 Subject: [PATCH] allow session configuration (#1028) --- .../frontend/session/SessionHandlerFactory.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/commafeed-server/src/main/java/com/commafeed/frontend/session/SessionHandlerFactory.java b/commafeed-server/src/main/java/com/commafeed/frontend/session/SessionHandlerFactory.java index 07adfe5dc..fcb671b3e 100644 --- a/commafeed-server/src/main/java/com/commafeed/frontend/session/SessionHandlerFactory.java +++ b/commafeed-server/src/main/java/com/commafeed/frontend/session/SessionHandlerFactory.java @@ -9,16 +9,26 @@ import org.eclipse.jetty.server.session.SessionCache; import org.eclipse.jetty.server.session.SessionHandler; +import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; import io.dropwizard.util.Duration; public class SessionHandlerFactory { + @JsonProperty private String path = "sessions"; + + @JsonProperty private Duration cookieMaxAge = Duration.days(30); + + @JsonProperty private Duration cookieRefreshAge = Duration.days(1); + + @JsonProperty private Duration maxInactiveInterval = Duration.days(30); + + @JsonProperty private Duration savePeriod = Duration.minutes(5); public SessionHandler build() {