feat(auth): use utc time
This commit is contained in:
parent
4e6b450338
commit
9c69dc7ec8
|
@ -18,7 +18,7 @@ func GenerateToken(key jwk.Key, thumbprint string) (string, error) {
|
||||||
return "", errors.WithStack(err)
|
return "", errors.WithStack(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
now := time.Now()
|
now := time.Now().UTC()
|
||||||
|
|
||||||
if err := token.Set(jwt.NotBeforeKey, now); err != nil {
|
if err := token.Set(jwt.NotBeforeKey, now); err != nil {
|
||||||
return "", errors.WithStack(err)
|
return "", errors.WithStack(err)
|
||||||
|
|
|
@ -42,7 +42,7 @@ func GenerateToken(ctx context.Context, key jwk.Key, issuer, subject string, rol
|
||||||
return "", errors.WithStack(err)
|
return "", errors.WithStack(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
now := time.Now()
|
now := time.Now().UTC()
|
||||||
|
|
||||||
if err := token.Set(jwt.NotBeforeKey, now); err != nil {
|
if err := token.Set(jwt.NotBeforeKey, now); err != nil {
|
||||||
return "", errors.WithStack(err)
|
return "", errors.WithStack(err)
|
||||||
|
|
Loading…
Reference in New Issue