-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(string): add jwt validator type Validate string in JWT format. NOT validate signature * test(string): add tests to validate jwt parse Validate all possibilities for validation function * docs(main): update main README Add z.string().jwt() to String validations list * fix(types): remove forgotten console.log * refactor(types-string): replace Buffer.from method for atob into JWT validation atob method is compatible with Node and modern browsers * fix(types-string): header property was misspelled Property is 'typ' and not 'type' * feat(types-string): add algorithm option to jwt Can pass a algorithm option to jwt method to check the algorithm of token. If not pass, no check is done for alg. * test(string): update tests to check jwt method Fix tests with false positive and add tests to check algorithm validation * docs(README): update readme.md Add info that jwt method accepts algorithm as option * Tweak API and docs * Fix tests --------- Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
- Loading branch information
1 parent
2184a2b
commit 12eca8e
Showing
8 changed files
with
206 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters