Skip to content

Commit a37b563

Browse files
committed
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.
1 parent 6d560b4 commit a37b563

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/litcli/sessions.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import (
99
"github.com/urfave/cli"
1010
)
1111

12+
var (
13+
// defaultSessionExpiry is the default time a session can be used for.
14+
// The current value evaluates to 90 days.
15+
defaultSessionExpiry = time.Hour * 24 * 90
16+
)
17+
1218
var sessionCommands = []cli.Command{
1319
{
1420
Name: "sessions",
@@ -38,7 +44,7 @@ var addSessionCommand = cli.Command{
3844
Name: "expiry",
3945
Usage: "number of seconds that the session should " +
4046
"remain active",
41-
Value: uint64(time.Hour.Seconds()),
47+
Value: uint64(defaultSessionExpiry.Seconds()),
4248
},
4349
cli.StringFlag{
4450
Name: "mailboxserveraddr",

0 commit comments

Comments
 (0)