Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Switch to form3-tech/jwt-go. #1822

Merged
merged 4 commits into from Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/glusterfs/app_middleware.go
Expand Up @@ -13,7 +13,7 @@ import (
"net/http"
"strings"

jwt "github.com/dgrijalva/jwt-go"
jwt "github.com/form3tech-oss/jwt-go"
"github.com/urfave/negroni"

"github.com/heketi/heketi/middleware"
Expand Down
2 changes: 1 addition & 1 deletion client/api/go-client/client.go
Expand Up @@ -25,7 +25,7 @@ import (
"strconv"
"time"

jwt "github.com/dgrijalva/jwt-go"
jwt "github.com/form3tech-oss/jwt-go"
"github.com/heketi/heketi/pkg/utils"
)

Expand Down
2 changes: 1 addition & 1 deletion docs/profiling.md
Expand Up @@ -63,7 +63,7 @@ Showing top 10 nodes out of 93
6.50MB 3.25% 77.23% 6.50MB 3.25% context.WithValue
6.50MB 3.25% 80.48% 6.50MB 3.25% encoding/json.(*decodeState).literalStore
6MB 3.00% 83.49% 6.50MB 3.25% net/textproto.(*Reader).ReadLine
5.50MB 2.75% 86.24% 39.51MB 19.76% github.com/heketi/heketi/vendor/github.com/dgrijalva/jwt-go.(*Parser).ParseWithClaims
5.50MB 2.75% 86.24% 39.51MB 19.76% github.com/heketi/heketi/vendor/github.com/form3tech-oss/jwt-go.(*Parser).ParseWithClaims
```

```
Expand Down
11 changes: 6 additions & 5 deletions glide.lock

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

5 changes: 3 additions & 2 deletions glide.yaml
@@ -1,10 +1,11 @@
package: github.com/heketi/heketi
import:
- package: github.com/auth0/go-jwt-middleware
version: v1.0.0
- package: github.com/boltdb/bolt
version: ^1.3.0
- package: github.com/dgrijalva/jwt-go
version: ^3.0.0
- package: github.com/form3tech-oss/jwt-go
version: ^3.2.2
- package: github.com/gorilla/context
- package: github.com/gorilla/mux
- package: github.com/heketi/rest
Expand Down
2 changes: 1 addition & 1 deletion middleware/jwt.go
Expand Up @@ -22,7 +22,7 @@ import (
"time"

jwtmiddleware "github.com/auth0/go-jwt-middleware"
jwt "github.com/dgrijalva/jwt-go"
jwt "github.com/form3tech-oss/jwt-go"
"github.com/heketi/heketi/pkg/logging"
)

Expand Down
4 changes: 2 additions & 2 deletions middleware/jwt_test.go
Expand Up @@ -24,7 +24,7 @@ import (
"testing"
"time"

jwt "github.com/dgrijalva/jwt-go"
jwt "github.com/form3tech-oss/jwt-go"
"github.com/heketi/heketi/pkg/utils"
"github.com/heketi/tests"
"github.com/urfave/negroni"
Expand Down Expand Up @@ -981,7 +981,7 @@ func TestJwtWrongSigningMethod(t *testing.T) {
// Setup pre-req bits needed to make our PS256 valid.
// Should we use a fake source of randomness instead of real
// rand.Reader here?
pk, err := rsa.GenerateKey(rand.Reader, 256*2)
pk, err := rsa.GenerateKey(rand.Reader, 512*2)
tests.Assert(t, err == nil, "rsa.GenerateKey failed:", err)
tokenString, err := token.SignedString(pk)
tests.Assert(t, err == nil, "token.SignedString failed:", err)
Expand Down