Skip to content

Commit

Permalink
upgrade jwt
Browse files Browse the repository at this point in the history
  • Loading branch information
matteriot committed Sep 10, 2023
1 parent 80c30f0 commit 45b9f01
Show file tree
Hide file tree
Showing 28 changed files with 334 additions and 204 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.13
require (
github.com/OpenIoTHub/getip v0.1.2
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/snappy v0.0.1
github.com/grandcat/zeroconf v1.0.0
github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
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/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
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/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/grandcat/zeroconf v1.0.0 h1:uHhahLBKqwWBV6WZUDAT71044vwOTL+McW0mBJvo6kE=
Expand Down
4 changes: 2 additions & 2 deletions models/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package models
import (
"fmt"
"github.com/OpenIoTHub/utils/net/ip"
"github.com/dgrijalva/jwt-go"
"github.com/golang-jwt/jwt"
uuid "github.com/satori/go.uuid"
"log"
"time"
Expand Down Expand Up @@ -32,7 +32,7 @@ func (t *TokenClaims) IfContainPermission(permission string) bool {
return false
}

//列表内的权限是否都包括
// 列表内的权限是否都包括
func (t *TokenClaims) IfContainPermissions(permissions []string) bool {
for _, p := range permissions {
if t.IfContainPermission(p) {
Expand Down
4 changes: 2 additions & 2 deletions models/uuidJwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package models

import (
"fmt"
"github.com/dgrijalva/jwt-go"
"github.com/golang-jwt/jwt"
"log"
"time"
)
Expand All @@ -24,7 +24,7 @@ func (t *UuidTokenClaims) IfContainPermission(permission string) bool {
return false
}

//列表内的权限是否都包括
// 列表内的权限是否都包括
func (t *UuidTokenClaims) IfContainPermissions(permissions []string) bool {
for _, p := range permissions {
if t.IfContainPermission(p) {
Expand Down
13 changes: 0 additions & 13 deletions vendor/github.com/dgrijalva/jwt-go/.travis.yml

This file was deleted.

97 changes: 0 additions & 97 deletions vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/github.com/golang-jwt/jwt/MIGRATION_GUIDE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 45b9f01

Please sign in to comment.