Dave Grijalva

Results 24 comments of Dave Grijalva

I'm sort of on the fence about it. There's no real harm in adding extra tests, however, I expect I'll get support tickets from people who are confused by this....

Oh. The issue is, the `MapClaims` types expects numbers to be either `float64` or `json.Number`. If you make a token by hand (vs parsing one), you can put `int` numbers...

@everdev this is a side effect of how the standard library JSON parser works. You can use the JSONNumber flag to use that library's number type, which is more flexible....

Version 4 adds more detailed error messages as well as better documentation. In the meantime, see the documentation for the signing method you're using. In your case: https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodECDSA `Expects *ecdsa.PrivateKey...

I would prefer to keep this library as free as possible of external dependencies. Version 4.0.0 introduces a method for you to drop in a different encoder for your own...

The signature is always verified before we evaluate claims. Until we believe the token is authentic, we don't even look at the claims it makes.

Pointers to interfaces can be tricky to work with. Where possible, I've tried to follow the interface patterns of `encoding/json` where possible, as that library forms the underpinnings of this...

This is a backward incompatible change. Please see the `4.0.0-preview1` release and see if that resolves your issue.

Good point. I forgot that was in there. I'll make a note to add some documentation for the next release.

I've never been very good at writing examples. Reading the godocs is far more useful than following the examples. If you want to open a PR with clearer examples, I'd...