Zaubrik / djwt

Create and verify JSON Web Tokens (JWT) with Deno or the browser.
MIT License
225 stars 23 forks source link

Add function validate #46

Closed timonson closed 3 years ago

timonson commented 3 years ago

This PR divides the function decode into the two functions decode and validate.

The intention is primarily better error handling. For example the error messages thrown by base64url.decode were not renamed previously.

But it also fits better semantically in my opinion.

The downside would be that the decode function was exported previously and people had to adapt accordingly.

I would love to get some feedback.

Thanks!