adam-hanna / jwt-auth

This package provides json web token (jwt) middleware for goLang http servers
MIT License
231 stars 43 forks source link

Error in Quickstart Example #2

Closed p4tin closed 8 years ago

p4tin commented 8 years ago

I did a "go get go get github.com/adam-hanna/jwt-auth/src" then I tried to run the QuickStart example with "go run quickstart.go" and I get the error:

# github.com/adam-hanna/jwt-auth/src
../github.com/adam-hanna/jwt-auth/src/jwt.go:20: undefined: jwt.StandardClaims

I assume I am missing a library can you tell me what it is?

adam-hanna commented 8 years ago

Interesting. Thanks for letting me know.

I'm using this library. It's already in my GOPATH so of course it's working for me.

This is my first go package so I'm still learning how to use package dependancies, etc. I'll try to get this fixed ASAP!

adam-hanna commented 8 years ago

This stackoverflow Q&A helped me to better understand how to include any vendor dependencies.

Thanks for your help. If you clone the most up to date version, everything should be working. Please let me know if there are still any issues.

Cheers!

p4tin commented 8 years ago

Ya I realized that I had not updated the dgrijalva/jwt-go library in a while and that was my problem - thanks for the response!!!

adam-hanna commented 8 years ago

Great!

I also should have placed it in the vendor folder of my package.

I'm still learning this goLang thing :P

Glad it's working, and thanks for the feedback!

p4tin commented 8 years ago

I will create a PR for the README.md to explain the steps I had to take to make it work there was also the fact that I needed to create the keys and place them in the correct directory.

adam-hanna commented 8 years ago

Awesome, but I actually may have fixed that in my last update. I think the example should be fully functional, now.

Adam Hanna

On Wed, Jul 20, 2016 at 3:15 PM, Paul Fortin notifications@github.com wrote:

I will create a PR for the README.md to explain the steps I had to take to make it work there was also the fact that I needed to create the keys and place them in the correct directory.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/adam-hanna/jwt-auth/issues/2#issuecomment-234100637, or mute the thread https://github.com/notifications/unsubscribe-auth/AFL2Fs-d3CPNE-xdwjPOHJy_spV4xo4nks5qXp39gaJpZM4JQZn8 .

p4tin commented 8 years ago

Sent a PR #3 do what you wish with it - it was just a bit more info on how to get started.