16 Commits
Author SHA1 Message Date
Filip SkokanandEduardo Diaz 11a0453c51 feat: add PS JWA support for applicable node versions (#573) 2019-02-20 13:42:37 +01:00
Javier EspinosaandEduardo Diaz 1e880c8c19 Add complete option in jwt.verify (#522)
* Add complete option in verify

* Remove comment

* Update README.md

Co-Authored-By: javespi <[email protected]>

* Move tests in a specific file
2019-02-20 13:32:23 +01:00
kazuki229andEduardo Diaz c7e16cb5d5 Add verify option for nonce validation (#540)
* Add verify option for nonce validation

* Update README.md

Co-Authored-By: kazuki229 <[email protected]>

* Refactor option-nonce test

* Add nonce option validation
2018-11-14 11:02:59 +01:00
Jaco KosterandEduardo Diaz 4d2a22c975 Secret callback revisited (#480)
* Introduction of the secret callback

Without the more contentious 'none'-changes

* Removed some spaces...

I should really add a editor.config and eslint to this project ;-)

* Removed xtend as a dependency, as the native Object.Assign can do this as well

* Removed xtend as a dependency, as the native Object.Assign can do this as well

* Resolve feedback from review

* Added extra test and fixed the associated bug

* The return of the header

* Forgot to change this one as well... Sorry bout that

* Updated the readme and made the if-statements consistent

* Space; The final frontier
2018-06-11 17:32:29 +02:00
TheBusCantSwimandEduardo Diaz 5193ee5616 Enhance audience check to verify against regular expressions (#398)
* Enhance audience check to verify against regular expressions

* Enhance audience check to verify against regular expressions

* Adapted README to have a showcase of the new RegExp-check for the audience validation
2017-10-09 19:29:15 +02:00
Fredrik LiljegrenandGitHub 3f2bff62d4 Merge pull request #349 from ziluvatar/fix-max-age-number-and-seconds
maxAge: Fix logic with number + use seconds instead of ms
2017-09-06 16:43:23 +02:00
ilyapxandEduardo Diaz 2bbd6a37b4 verify: remove process.nextTick (#302)
running synchronous code asynchronously using process.nextTick
has a negative latency impact
2017-09-06 16:41:55 +02:00
Eduardo Diaz 23cb6f1d24 maxAge: Add validation to timespan result 2017-08-29 12:24:08 +02:00
Eduardo Diaz 543bf7f71d maxAge: Fix logic with number + use seconds instead of ms 2017-05-13 17:29:19 +02:00
Michael BorstandEduardo Diaz 912e40685f Allow user to specify now. (#274) 2017-02-10 19:27:44 +01:00
Sergey MaslyakovandEduardo Diaz 047f1ae04b Raise jws.decode error to avoid confusion with "invalid token" error (#294)
* Corrected indistinguishable error messages

jws.decode() never throws an error. At least, in its current version. However, if it were to throw an exception, the diagnostics would be indistinguishable from a soft failure to decode a token. I had an extra trailing space on my JWT and it took me some additional debugging work to trace the actual root cause because the error message was not distinct.

* Allowed an exception from inside of jws.decode to be handled by the caller. Currently, jws.decode never throws an exception. The change is made per discsussion in the original PR

* Added a test case and proper forwarding of the possible exception thrown from jws.decode

* Typo correction
2017-02-09 13:54:58 +01:00
Ricardo GamaandEduardo Diaz c4f7670972 Fix handling non string tokens (#305) 2017-02-03 21:07:54 +01:00
José F. Romaniello d06359ef3b Revert "Merge branch 'venatir-master'"
This reverts commit d66d4ebd3e, reversing
changes made to 5117aacd01.
2016-08-11 13:22:15 -03:00
Mircea Danila Dumitrescu 55d5834f7b Removing unnecessary extra decoding. jwtString is already verified as valid and signature checked 2016-08-10 09:52:10 +01:00
José F. Romaniello 63263a28a2 do not mutate options in jwt.verify, closes #227 2016-07-12 09:52:32 -03:00
José F. Romaniello e11d505207 refactor into multiple files 2016-07-12 09:49:04 -03:00