From 1254f5dac0b6e1fcb3a660404618dbe4a2dc5837 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Fri, 19 Nov 2021 11:01:03 +0300 Subject: [PATCH] [#282] Fix lifetime examples Signed-off-by: Denis Kirillov --- cmd/authmate/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/authmate/main.go b/cmd/authmate/main.go index c3c63d46a..bb59f6bc1 100644 --- a/cmd/authmate/main.go +++ b/cmd/authmate/main.go @@ -27,8 +27,8 @@ import ( const ( poolConnectTimeout = 5 * time.Second poolRequestTimeout = 5 * time.Second - // a number of 1-hour epochs in a month. - defaultLifetime = 720 + // a month. + defaultLifetime = 30 * 24 * time.Hour ) var ( @@ -199,8 +199,9 @@ func issueSecret() *cli.Command { Value: false, }, &cli.DurationFlag{ - Name: "lifetime", - Usage: "Lifetime of tokens (e.g. 1d2h30m, it will be ceil rounded to the nearest amount of epoch)", + Name: "lifetime", + Usage: `Lifetime of tokens. For example 50h30m (note: max time unit is an hour so to set a day you should use 24h). +It will be ceil rounded to the nearest amount of epoch.`, Required: false, Destination: &lifetimeFlag, Value: defaultLifetime,