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

jwt-go example false.. #37

Open
whidbey opened this issue Apr 28, 2015 · 1 comment
Open

jwt-go example false.. #37

whidbey opened this issue Apr 28, 2015 · 1 comment

Comments

@whidbey
Copy link

whidbey commented Apr 28, 2015

comfuse issue when using gin-gonic /jwt-go middleware
running the example:
http://localhost:8080/api/ shows
{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6IkNocmlzdG9waGVyIiwiZXhwIjoxNDMwMjMyMDMxfQ.T5ZM8Um_UPp7LNoRbs7cBT8R5BPN2jbkeCBu4SbQ2yM"}

and curl it:

curl -i http://localhost:8080/api/private/ -X GET --header "Authorization: BEARER
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6IkNocmlzdG9waGVyIiwiZXhwIjoxNDMwMjMyMDMxfQ.T5ZM8Um_UPp7LNoRbs7cBT8R5BPN2jbkeCBu4SbQ2yM"

Error #1: key is invalid or of invalid type
Meta: Operation aborted

seems the verify false.
what happend?

@matthewmcneely
Copy link

In your second curl command, change the incorrectly capitalized BEARER to Bearer and your request will work.

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

No branches or pull requests

2 participants