adam-hanna/jwt-auth

Error in Quickstart Example

p4tin opened this issue · 7 comments

p4tin commented

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?

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!

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

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!!!

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

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.

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
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFL2Fs-d3CPNE-xdwjPOHJy_spV4xo4nks5qXp39gaJpZM4JQZn8
.

p4tin commented

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