From b7c2aba67ec731b3e8d2b8292a3b72692abef6ee Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Fri, 8 Sep 2023 12:32:46 +0300 Subject: [PATCH] upgrade kataras/jwt package and auth/sso: add a future forgiven of 1 minute to issuet_at --- auth/auth.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/auth/auth.go b/auth/auth.go index b93b9dce1..788810b83 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -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 } diff --git a/go.mod b/go.mod index afc01d8b8..a733e5586 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 2fe6289d7..21bbbbd9a 100644 --- a/go.sum +++ b/go.sum @@ -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=