From eae3cbc7bb13a1c310f896db5fb7016c8e5fc642 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 27 Jul 2021 10:46:28 +0200 Subject: [PATCH] Replace jwt-go with github.com/golang-jwt/jwt --- go.mod | 2 +- go.sum | 3 ++- pkg/integrations/integrations.go | 2 +- pkg/models/link_sharing.go | 2 +- pkg/modules/auth/auth.go | 2 +- pkg/routes/api/v1/login.go | 2 +- pkg/routes/api/v1/token_check.go | 2 +- pkg/user/user.go | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index b0272494..1b683e1e 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,6 @@ require ( github.com/coreos/go-oidc/v3 v3.0.0 github.com/cweill/gotests v1.6.0 github.com/d4l3k/messagediff v1.2.1 - github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/disintegration/imaging v1.6.2 github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 github.com/gabriel-vasile/mimetype v1.3.1 @@ -37,6 +36,7 @@ require ( github.com/go-redis/redis/v8 v8.11.0 github.com/go-sql-driver/mysql v1.6.0 github.com/go-testfixtures/testfixtures/v3 v3.6.1 + github.com/golang-jwt/jwt v3.2.1+incompatible github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 github.com/golang/snappy v0.0.4 // indirect github.com/iancoleman/strcase v0.2.0 diff --git a/go.sum b/go.sum index 8a3051cf..b7d08354 100644 --- a/go.sum +++ b/go.sum @@ -230,6 +230,8 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= @@ -490,7 +492,6 @@ github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsO github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= github.com/mattn/go-sqlite3 v1.14.4/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.7 h1:fxWBnXkxfM6sRiuH3bqJ4CfzZojMOLVc0UTsTglEghA= github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU= github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= diff --git a/pkg/integrations/integrations.go b/pkg/integrations/integrations.go index 45ed29ef..8bea99f3 100644 --- a/pkg/integrations/integrations.go +++ b/pkg/integrations/integrations.go @@ -35,7 +35,7 @@ import ( "code.vikunja.io/api/pkg/user" "code.vikunja.io/web" "code.vikunja.io/web/handler" - "github.com/dgrijalva/jwt-go" + "github.com/golang-jwt/jwt" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" ) diff --git a/pkg/models/link_sharing.go b/pkg/models/link_sharing.go index 9803b1db..5f51a2fc 100644 --- a/pkg/models/link_sharing.go +++ b/pkg/models/link_sharing.go @@ -25,7 +25,7 @@ import ( "code.vikunja.io/api/pkg/user" "code.vikunja.io/api/pkg/utils" "code.vikunja.io/web" - "github.com/dgrijalva/jwt-go" + "github.com/golang-jwt/jwt" "xorm.io/xorm" ) diff --git a/pkg/modules/auth/auth.go b/pkg/modules/auth/auth.go index 167d44b2..83495e01 100644 --- a/pkg/modules/auth/auth.go +++ b/pkg/modules/auth/auth.go @@ -24,7 +24,7 @@ import ( "code.vikunja.io/api/pkg/models" "code.vikunja.io/api/pkg/user" "code.vikunja.io/web" - "github.com/dgrijalva/jwt-go" + "github.com/golang-jwt/jwt" "github.com/labstack/echo/v4" ) diff --git a/pkg/routes/api/v1/login.go b/pkg/routes/api/v1/login.go index 6a5ae7a8..82c2390f 100644 --- a/pkg/routes/api/v1/login.go +++ b/pkg/routes/api/v1/login.go @@ -25,7 +25,7 @@ import ( "code.vikunja.io/api/pkg/modules/auth" user2 "code.vikunja.io/api/pkg/user" "code.vikunja.io/web/handler" - "github.com/dgrijalva/jwt-go" + "github.com/golang-jwt/jwt" "github.com/labstack/echo/v4" ) diff --git a/pkg/routes/api/v1/token_check.go b/pkg/routes/api/v1/token_check.go index c3cd263b..af89c8a6 100644 --- a/pkg/routes/api/v1/token_check.go +++ b/pkg/routes/api/v1/token_check.go @@ -20,7 +20,7 @@ import ( "fmt" "code.vikunja.io/api/pkg/models" - "github.com/dgrijalva/jwt-go" + "github.com/golang-jwt/jwt" "github.com/labstack/echo/v4" ) diff --git a/pkg/user/user.go b/pkg/user/user.go index 87c1d360..36514639 100644 --- a/pkg/user/user.go +++ b/pkg/user/user.go @@ -29,7 +29,7 @@ import ( "xorm.io/xorm" "code.vikunja.io/web" - "github.com/dgrijalva/jwt-go" + "github.com/golang-jwt/jwt" "github.com/labstack/echo/v4" "golang.org/x/crypto/bcrypt" )