From a37b56393e82396df2b7c672ef1602032043f7d9 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Wed, 23 Feb 2022 09:48:50 +0100 Subject: [PATCH] cmd/litcli: change default session expiry to 3 months The default expiry of one hour was way too short for anything practical and we increase it to 90 days which is almost three months. The user can still override this value manually by specifying the flag. --- cmd/litcli/sessions.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/litcli/sessions.go b/cmd/litcli/sessions.go index 8b842b24e..6648ead94 100644 --- a/cmd/litcli/sessions.go +++ b/cmd/litcli/sessions.go @@ -9,6 +9,12 @@ import ( "github.com/urfave/cli" ) +var ( + // defaultSessionExpiry is the default time a session can be used for. + // The current value evaluates to 90 days. + defaultSessionExpiry = time.Hour * 24 * 90 +) + var sessionCommands = []cli.Command{ { Name: "sessions", @@ -38,7 +44,7 @@ var addSessionCommand = cli.Command{ Name: "expiry", Usage: "number of seconds that the session should " + "remain active", - Value: uint64(time.Hour.Seconds()), + Value: uint64(defaultSessionExpiry.Seconds()), }, cli.StringFlag{ Name: "mailboxserveraddr",