instructure / paseto

A paseto implementation in rust.
MIT License
151 stars 14 forks source link

fix expired bug, improve errors #34

Closed frederikbosch closed 3 years ago

frederikbosch commented 3 years ago

While I was debugging #33 to fix the bug that an valid expiration date was rejected by validate_local_token, I decided that more clear errors help to debug why something is failing. This PR fixes one thing: the wrong comparison character was used > vs < and more errors are added to improve library usage experience.

frederikbosch commented 3 years ago

Nice suggestions, will take them both into account.

frederikbosch commented 3 years ago

Done!

frederikbosch commented 3 years ago

I resolved those last week. There are some more other issues outstanding when running cargo test --features "v1,v2,easy_tokens_time". I did not find the time (yet) to fix those. Could you perhaps take a look?

Mythra commented 3 years ago

Ah looks like github didn't get the memo this was merged. Sorry about the delay, holidays and all. Also sorry about the failures! Turns out there were some edge cases when chrono + time were being used in conjuction that weren't caught cause we didn't think anyone would use that!

(Both were being included because chrono is default and without --no-default-features it included both).

Anyway it's been fixed, and this PR is merged!

Thank you so much for your contribution!

frederikbosch commented 3 years ago

Thank you, for merging and the wonderful library!