Closed bt-nia closed 7 months ago
I was able to figure out what was wrong. Since all the examples are outdated, I went ahead and updated them (untested): https://github.com/auth0/go-jwt-middleware/pull/242
The fix is to define
jwtmiddleware "github.com/auth0/go-jwt-middleware/v2"
cc: @ewanharris
Checklist
Description
The example in the README as well as (at least) the https://github.com/auth0/go-jwt-middleware/blob/master/examples/http-jwks-example/main.go do not work in the current state of the library.
Reproduction
copy code from readme into main.go go get github.com/auth0/go-jwt-middleware/v2@latest go run main.go
results in: ➜ golang-jwks-validation-test git:(main) ✗ go run main.go main.go:11:2: no required module provides package github.com/auth0/go-jwt-middleware/v2/jwtmiddleware; to add it: go get github.com/auth0/go-jwt-middleware/v2/jwtmiddleware
Go JWT Middleware version
2.2.0
Go version
1.21