Skip to content

Commit 68c40c0

Browse files
committed
remove buggy jwt lib
1 parent e5d9b58 commit 68c40c0

25 files changed

+4
-1618
lines changed

api/v1/user.go

+3
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ func (u userApi) AttachCompany(context echo.Context) error {
132132
log.Println("Input Error:", err.Error())
133133
return common.GenerateErrorResponse(context, nil, "Failed to Bind Input!")
134134
}
135+
if formData.Id==""{
136+
formData.Id=uuid.New().String()
137+
}
135138
err := u.userService.AttachCompany(formData, formData.Id,token)
136139
if err != nil {
137140
return common.GenerateErrorResponse(context, "[ERROR]: Failed to attach company with user", err.Error())

core/v1/logic/jwt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"crypto/x509"
66
"encoding/json"
77
"encoding/pem"
8-
"github.com/dgrijalva/jwt-go"
8+
"github.com/golang-jwt/jwt"
99
"github.com/klovercloud-ci/config"
1010
v1 "github.com/klovercloud-ci/core/v1"
1111
"github.com/klovercloud-ci/core/v1/service"

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ require (
1313
require github.com/google/go-cmp v0.5.5 // indirect
1414

1515
require (
16-
github.com/dgrijalva/jwt-go v3.2.0+incompatible
1716
github.com/golang-jwt/jwt v3.2.2+incompatible
1817
github.com/labstack/gommon v0.3.1 // indirect
1918
github.com/swaggo/echo-swagger v1.2.0

go.sum

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
1212
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1313
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1414
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
15-
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
1615
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
1716
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
1817
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=

vendor/github.com/dgrijalva/jwt-go/.gitignore

-4
This file was deleted.

vendor/github.com/dgrijalva/jwt-go/.travis.yml

-13
This file was deleted.

vendor/github.com/dgrijalva/jwt-go/LICENSE

-8
This file was deleted.

vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md

-97
This file was deleted.

vendor/github.com/dgrijalva/jwt-go/README.md

-100
This file was deleted.

0 commit comments

Comments
 (0)