auth0 / go-jwt-middleware

A Middleware for Go Programming Language to check for JWTs on HTTP requests
MIT License
1.08k stars 205 forks source link

Incompatible | breaking change on callback function signature in jwtmiddleware options #96

Closed eregnier closed 3 years ago

eregnier commented 3 years ago

Hey, I have this error with the latest version of this library. It looks like the callback function signature does not match current ValidationKeyGetter option value.

I don't know how to solve this as I did not change my code and the code is broken. So it looks like a regression / breaking change where I do not have a clue how to solve as the readme example remains unchanged and looks not compatible with the current library version.

I don't know which version I was using before, however now I have updated this library and it is up to date on my workstation.

Is there something to do on my side ? Am I missing something ?

I work on linux (ubuntu) with go go version go1.16.3 linux/amd64

Thank you for any help :)

image

grounded042 commented 3 years ago

Hey @eregnier, sorry you are facing this. If you look at #69 you can see what lead to this breaking change. The decision was made to have this breaking change in order to fix a security vulnerability.

A contributing factor to this issue is that up until this point this package has not been versioned.

I'm guessing you are pulling in github.com/dgrijalva/jwt-go? If you change that to github.com/form3tech-oss/jwt-go you should be good to go.

eregnier commented 3 years ago

it works. thank you.