From 8c5beb78aabae7ac21497ec791472077f1d0d9fe Mon Sep 17 00:00:00 2001 From: scnace Date: Thu, 24 Mar 2022 11:24:55 +0800 Subject: [PATCH] all: bump jwt dependency to v4 due to the incompatiblity of v3 Signed-off-by: scnace --- README.md | 2 +- go.mod | 2 +- go.sum | 4 ++-- testcmd/decodejwt/main.go | 2 +- token.go | 2 +- token_test.go | 2 +- util.go | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f369fe3..fc3df78 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ import ( cmAuth "github.com/chartmuseum/auth" - "github.com/golang-jwt/jwt" + "github.com/golang-jwt/jwt/v4" ) func main() { diff --git a/go.mod b/go.mod index 129132e..8b50640 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/chartmuseum/auth go 1.17 require ( - github.com/golang-jwt/jwt v3.2.2+incompatible + github.com/golang-jwt/jwt/v4 v4.2.0 github.com/jmespath/go-jmespath v0.4.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.7.0 diff --git a/go.sum b/go.sum index 0c16c8e..d183c5a 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= diff --git a/testcmd/decodejwt/main.go b/testcmd/decodejwt/main.go index e2f1d78..5f10c29 100644 --- a/testcmd/decodejwt/main.go +++ b/testcmd/decodejwt/main.go @@ -23,7 +23,7 @@ import ( cmAuth "github.com/chartmuseum/auth" - "github.com/golang-jwt/jwt" + "github.com/golang-jwt/jwt/v4" ) func main() { diff --git a/token.go b/token.go index 2c08460..8a0c316 100644 --- a/token.go +++ b/token.go @@ -20,7 +20,7 @@ import ( "crypto/rsa" "time" - "github.com/golang-jwt/jwt" + "github.com/golang-jwt/jwt/v4" ) const ( diff --git a/token_test.go b/token_test.go index e457a0e..06ce0a1 100644 --- a/token_test.go +++ b/token_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "github.com/golang-jwt/jwt" + "github.com/golang-jwt/jwt/v4" "github.com/stretchr/testify/suite" ) diff --git a/util.go b/util.go index c401d7f..b1897a8 100644 --- a/util.go +++ b/util.go @@ -28,7 +28,7 @@ import ( "io/ioutil" "strings" - "github.com/golang-jwt/jwt" + "github.com/golang-jwt/jwt/v4" ) func containsAction(actionsList []string, action string) bool {