From 3b4795f58ab62cdf516dd8562f6b57ee1a9e6447 Mon Sep 17 00:00:00 2001 From: jackyu Date: Mon, 29 Jan 2024 19:25:28 +0800 Subject: [PATCH] fix: pipeline not run caused by nbf early now --- pkg/jwt/token/jwt.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/jwt/token/jwt.go b/pkg/jwt/token/jwt.go index de3f1956..97a377a0 100644 --- a/pkg/jwt/token/jwt.go +++ b/pkg/jwt/token/jwt.go @@ -99,7 +99,6 @@ func (s *jwtTokenIssuer) Verify(tokenString string) (user.Info, TokenType, error func (s *jwtTokenIssuer) IssueTo(user user.Info, tokenType TokenType, expiresIn time.Duration) (string, error) { issueAt := time.Now().Unix() - int64(s.maximumClockSkew.Seconds()) - notBefore := issueAt clm := &Claims{ Username: user.GetName(), Groups: user.GetGroups(), @@ -108,7 +107,6 @@ func (s *jwtTokenIssuer) IssueTo(user user.Info, tokenType TokenType, expiresIn StandardClaims: jwt.StandardClaims{ IssuedAt: issueAt, Issuer: s.name, - NotBefore: notBefore, }, }