instructure / paseto

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

allow validating a token with only a public key #12

Closed Mythra closed 4 years ago

Mythra commented 4 years ago

Motivation

This allows a user to use the "nicer" token interface (which actually validates the known JWT fields, exp, iat, nbf) with only a public key in the validation phase. This is already possible seeing as how the raw interface the token interface builds on supports this.

Secondly I also decided to make the validate_potential_json_blob function public. There isn't a real reason it needed to be private, and if a user just wants the validation of those fields they should be able to have it.

Test Plan

All code has automated tests, and all tests continue to pass

Mythra commented 4 years ago

This will fix #11