Could anyone tell me why the following (from https://github.com/dgrijalva/jwt-go) example doesn't work?
token, err := jwt.Parse(myToken, func(token *jwt.Token) ([]byte, error) {
return myLookupKey(token.Header["kid"])
})
if err == nil && token.Valid {
deliverGoodness("!")
} else {
deliverUtterRejection(":(")
}
I get an error saying "cannot use func literal (type func(*jwt.Token) ([]byte, error)) as type jwt.Keyfunc in argument to jwt.Parse"
I've tried to use the code from couple of different jwt-go examples but always ended up with this same error.