paragonie / paseto

Platform-Agnostic Security Tokens
https://paseto.io
Other
3.23k stars 108 forks source link

Examples are wrong? #50

Closed aidantwoods closed 6 years ago

aidantwoods commented 6 years ago

So I thought I'd add an example from the readme to my test suite, and it turns out there are some typos (unless of course my implementation is somehow completing words and changing a year ;p)

screen shot 2018-03-08 at 19 00 44

I think "exp": should be "expires": and the year should be 2019 instead of 2039.

(correct example)

I would have opened this as a PR, but I wanted to check whether the second example also has the same problem. It appears to, but I can't conclude this because there isn't a public key available to verify the message ;-) (this is a request to add the public key to the readme)

paragonie-scott commented 6 years ago

I think it's a matter of me updating one but not the other. Good catch. :)

paragonie-scott commented 6 years ago

I'll have this fixed tonight.

paragonie-scott commented 6 years ago

https://github.com/paragonie/paseto/commit/d2f8902738486d1308a09197202be36c4d4ff6f8 -- I included a unit test so we can copy/paste tokens and then verify their correctness if the README is ever changed.

aidantwoods commented 6 years ago

Good call on adding the unit tests too 👍