Skip to content

Commit

Permalink
Use default token expiration of 1 year
Browse files Browse the repository at this point in the history
If user does not specify a token expiration, default to 1 year.
  • Loading branch information
codenrhoden committed May 3, 2017
1 parent ad9932e commit cc3b834
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/cli/cmds_60_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const (

rrTokExpEnv = "REXRAY_TOKEN_EXP"
rrTokExpKey = "rexray.token.exp"

// 8760 hours is 365 days
defaultTokenExp = time.Duration(8760 * time.Hour)
)

var (
Expand Down Expand Up @@ -199,6 +202,9 @@ func (c *CLI) tokenValidateExp() time.Duration {
}
return exp
}
c.ctx.WithField("exp", defaultTokenExp).Info(
"Using default token expiration duration")
exp = defaultTokenExp
}
return exp
}
Expand Down

0 comments on commit cc3b834

Please sign in to comment.