upgrade kataras/jwt package and auth/sso: add a future forgiven of 1 minute to issuet_at

This commit is contained in:
Gerasimos (Makis) Maropoulos 2023-09-08 12:32:46 +03:00
parent 9a8e40cecf
commit b7c2aba67e
No known key found for this signature in database
GPG Key ID: B9839E9CD30B7B6B
3 changed files with 4 additions and 4 deletions

View File

@ -382,7 +382,7 @@ func (s *Auth[T]) verify(ctx stdContext.Context, token []byte) (T, StandardClaim
return t, StandardClaims{}, jwt.ErrMissing
}
verifiedToken, err := jwt.VerifyWithHeaderValidator(nil, nil, token, s.keys.ValidateHeader, jwt.Leeway(time.Minute))
verifiedToken, err := jwt.VerifyWithHeaderValidator(nil, nil, token, s.keys.ValidateHeader, jwt.Future(time.Minute), jwt.Leeway(time.Minute))
if err != nil {
return t, StandardClaims{}, err
}

2
go.mod
View File

@ -23,7 +23,7 @@ require (
github.com/json-iterator/go v1.1.12
github.com/kataras/blocks v0.0.7
github.com/kataras/golog v0.1.9
github.com/kataras/jwt v0.1.9
github.com/kataras/jwt v0.1.10
github.com/kataras/neffos v0.0.22
github.com/kataras/pio v0.0.12
github.com/kataras/sitemap v0.0.6

4
go.sum generated
View File

@ -112,8 +112,8 @@ github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4=
github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I=
github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk=
github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY=
github.com/kataras/jwt v0.1.9 h1:DmmemKA/qMNGGHJ6PrLv059DvOeA71ch5ESNc0ueqVk=
github.com/kataras/jwt v0.1.9/go.mod h1:Kw6GZv2JQN8K4D3NGaSc/qZzTYfaRdyaC2zWi+RBRIQ=
github.com/kataras/jwt v0.1.10 h1:GBXOF9RVInDPhCFBiDumRG9Tt27l7ugLeLo8HL5SeKQ=
github.com/kataras/jwt v0.1.10/go.mod h1:xkimAtDhU/aGlQqjwvgtg+VyuPwMiyZHaY8LJRh0mYo=
github.com/kataras/neffos v0.0.22 h1:3M4lHrUl//2OKmS9t9z3AKIZqwha6ABeA6WoF03HEv8=
github.com/kataras/neffos v0.0.22/go.mod h1:IIJZcUDvwBxJGlDj942dqQgyznVKYDti91f8Ez+RRxE=
github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w=