mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Add UTCNow() function. (#3931)
This patch adds UTCNow() function which returns current UTC time. This is equivalent of UTCNow() == time.Now().UTC()
This commit is contained in:
@@ -59,7 +59,7 @@ func authenticateJWT(accessKey, secretKey string, expiry time.Duration) (string,
|
||||
return "", errAuthentication
|
||||
}
|
||||
|
||||
utcNow := time.Now().UTC()
|
||||
utcNow := UTCNow()
|
||||
token := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, jwtgo.MapClaims{
|
||||
"exp": utcNow.Add(expiry).Unix(),
|
||||
"iat": utcNow.Unix(),
|
||||
|
||||
Reference in New Issue
Block a user