From b32477060b15fd50f40d22f97f557d59be87c9d2 Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Thu, 9 Nov 2023 23:41:42 +0200 Subject: [PATCH] update _benchmarks modules --- _benchmarks/README.md | 2 +- _benchmarks/go.mod | 8 ++++---- _benchmarks/go.sum | 10 ++++------ _benchmarks/sign_benchmark_test.go | 2 +- _benchmarks/verify_benchmark_test.go | 4 ++-- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/_benchmarks/README.md b/_benchmarks/README.md index 0537939..b7d6157 100644 --- a/_benchmarks/README.md +++ b/_benchmarks/README.md @@ -20,7 +20,7 @@ $ go test -bench=. ## Results -Comparison between: [kataras/jwt](https://github.com/kataras/jwt), [dgrijalva/jwt-go](github.com/dgrijalva/jwt-go) and [go-jose/go-jose](https://github.com/go-jose/go-jose). Higher is better. +Comparison between: [kataras/jwt](https://github.com/kataras/jwt), [golang-jwt/jwt](github.com/golang-jwt/jwt) and [go-jose/go-jose](https://github.com/go-jose/go-jose). Higher is better. ![Benchmarks Total Repetitions - higher is better](http://iris-go.com/images/jwt/benchmarks.png) diff --git a/_benchmarks/go.mod b/_benchmarks/go.mod index 3eaea63..923c3fa 100644 --- a/_benchmarks/go.mod +++ b/_benchmarks/go.mod @@ -1,13 +1,13 @@ module benchmarks -go 1.19 +go 1.20 replace github.com/kataras/jwt => ../ require ( - github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/go-jose/go-jose/v3 v3.0.0 + github.com/go-jose/go-jose/v3 v3.0.1 + github.com/golang-jwt/jwt v3.2.2+incompatible github.com/kataras/jwt v0.0.0-00010101000000-000000000000 ) -require golang.org/x/crypto v0.6.0 // indirect +require golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 // indirect diff --git a/_benchmarks/go.sum b/_benchmarks/go.sum index 366865f..18f30ec 100644 --- a/_benchmarks/go.sum +++ b/_benchmarks/go.sum @@ -1,9 +1,9 @@ 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/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= +github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +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/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -14,8 +14,6 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/_benchmarks/sign_benchmark_test.go b/_benchmarks/sign_benchmark_test.go index ef71d44..ff35ad9 100644 --- a/_benchmarks/sign_benchmark_test.go +++ b/_benchmarks/sign_benchmark_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - jwtgo "github.com/dgrijalva/jwt-go" jose "github.com/go-jose/go-jose/v3" josejwt "github.com/go-jose/go-jose/v3/jwt" + jwtgo "github.com/golang-jwt/jwt" jwt "github.com/kataras/jwt" ) diff --git a/_benchmarks/verify_benchmark_test.go b/_benchmarks/verify_benchmark_test.go index 523dbda..495b559 100644 --- a/_benchmarks/verify_benchmark_test.go +++ b/_benchmarks/verify_benchmark_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - jwtgo "github.com/dgrijalva/jwt-go" josejwt "github.com/go-jose/go-jose/v3/jwt" + jwtgo "github.com/golang-jwt/jwt" jwt "github.com/kataras/jwt" ) @@ -69,7 +69,7 @@ func BenchmarkVerify_go_jose(b *testing.B) { // Note: the go-jose package's `ParseSigned` does not actually verify the token, // it just decodes it, we have to call its `Claims` method without a destination (2nd arg) // to make it to verify the signature (the fastest way to do it on that package) - // unlike the rest (kataras/jwt and dgrijalva/jwt-go). + // unlike the rest (kataras/jwt and golang-jwt/jwt). parsedToken, err := josejwt.ParseSigned(tokenString) if err != nil { b.Fatal(err)