contrib icon indicating copy to clipboard operation
contrib copied to clipboard

jwt-go example false..

Open whidbey opened this issue 10 years ago • 1 comments
trafficstars

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 #01: key is invalid or of invalid type Meta: Operation aborted

seems the verify false. what happend?

whidbey avatar Apr 28 '15 13:04 whidbey

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

matthewmcneely avatar Mar 16 '17 20:03 matthewmcneely