-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to dgrijalva/jwt-go/v4 #1873
Comments
security checkers return |
About that TLDR: if you are not checking aud in your code or have NOT made it OPTIONAL - you are safe. Regarding jwt middleware. We are thinking of address it - no direct actions yet. Whether it is refactoring so that there are no direct dependency to explicit library or move jwt middleware to separate lib or some other thing that guards core more from problems with third party libs. |
Dear @aldas, Thank you for letting us know! We will definitely try this out or we will wait for v5 |
done in #1946 |
Issue Description
Dear developers,
First of all, thank you for creating and maintaining such a cool router! Very easy to use.
Second of all, could you please kindly update github.com/dgrijalva/jwt-go v3.2.0+incompatible to a version 4 that has modules and more reliable I guess.
Checklist
Expected behaviour
I use a handler func that gets claims out of JWT token and checks roles.
It is similar to what you have in you docs:
I expected it to work :)
Actual behaviour
However, it failed if I use version 4 of jwt-go. The errors is
interface conversion: interface {} is *jwt.Token, not *jwt.Token (types from different packages)
Similar issue: dgrijalva/jwt-go#401
So in order to solve this issue I had to switch to v3.2.0 you are using.
Can we please fix it in version 5 due to compatibility break?
Version/commit
v4.1.15
The text was updated successfully, but these errors were encountered: