Skip to content
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

security fix unauthorized tokens could be used to access a protected ressource #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

szuecs
Copy link

@szuecs szuecs commented Mar 30, 2015

It's important to validate the token before granting access.
https://github.com/dgrijalva/jwt-go -> "Parse and Verify"

I hope it is the right way to use net/http, I did not understand how to use c.Fail() here, because I could not create an Error.

regards, sandor

@szuecs
Copy link
Author

szuecs commented Mar 31, 2015

As far as I understand https://github.com/dgrijalva/jwt-go/blob/master/jwt.go it does not lead to a security issue right now, but in my opinion it's internal details and may change in the future.
I saw that the initial commit https://github.com/gin-gonic/contrib/blob/0de68a89e80e75ca93ec8ff91ad9bbd3dcd72794/jwt/jwt.go checked token.Valid and it seems better fit with gin error handling than in my original pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant