Skip to content

Commit

Permalink
allow session configuration (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
Athou committed Jan 4, 2023
1 parent 7ea24b2 commit 3271d69
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 3271d69

Please sign in to comment.