427 Commits
Author SHA1 Message Date
Eduardo Diaz 71e7b43c7d 8.5.1 v8.5.1 2019-03-18 12:25:21 +01:00
Filip SkokanandEduardo Diaz fbab0a0ee9 fix: ensure correct PS signing and verification (#585) 2019-03-18 12:17:04 +01:00
Eduardo DiazandGitHub 96f8fa8e04 README: fix markdown for algorithms table 2019-02-20 15:07:21 +01:00
Eduardo Diaz de0f610512 8.5.0 v8.5.0 2019-02-20 14:06:59 +01:00
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
Lio李欧andEduardo Diaz f1f30a38a3 Force use_strict during testing (#577)
* Force use_strict during testing

* Add string payload test cases to .iat tests
2019-02-20 13:22:27 +01:00
Mike MacCanaandEduardo Diaz 0d33928084 Fix 'cert' token which isn't a cert (#554)
Certs have pubkeys. We sign things with private keys.
2019-02-13 16:49:01 +01:00
Eduardo DiazandFilip Skokan d00ab1d8e0 ci: remove nsp from tests (#569)
Fixes https://github.com/auth0/node-jsonwebtoken/issues/567
2019-01-23 11:16:28 +01:00
Tim OramandEduardo Diaz 53a76f1ca2 Add tests for private claims in the payload (#555)
This change adds tests for private claims added to the payload during
sign and ensures that after verifying the payload contains the expected
claim.
2018-12-14 15:17:45 +01:00
Tim OramandEduardo Diaz 18945ff721 Refactor tests related to jti and jwtid (#544)
This change extracts all tests related to the jti claim and the jwtid
option into a single test file. Additional tests were added that were
missing.
2018-11-23 12:12:59 +01:00
Eduardo Diaz c4b352c157 8.4.0 2018-11-14 11:29:21 +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
gkwangandEduardo Diaz 1ab3963eef devDeps: [email protected] (#539) 2018-11-02 12:00:08 +01:00
RobertandEduardo Diaz 81ed983edd Edited the README.md to make certain parts of the document for the api easier to read, emphasizing the examples. (#548) 2018-11-02 11:25:04 +01:00
Tim OramandEduardo Diaz b280f8cc55 Refactor tests related to kid and keyid (#545)
Thie change extracts the tests related to the kid header and the keyid
option into a single file. Additonal tests were added that were missing.
2018-11-02 11:05:03 +01:00
Tim OramandEduardo Diaz 72223a1f2c Refactor tests related to iss and issuer (#543)
This change extracts all tests related to the iss claim and the issuer
option into a single test file. Additional tests were added that were
missing.
2018-11-02 11:02:16 +01:00
Yash GaurkarandEduardo Diaz 06eb4becd7 Update README.md (#538) 2018-11-01 11:41:54 +01:00
Andrew NesterandEduardo Diaz e1af5cfd31 Fixed error message when empty string passed as expiresIn or notBefore option (#531)
* Fixed error message when empty string passed as expiresIn or notBefore option

* Moved tests to option validation block
2018-10-22 20:40:25 +02:00
Aakash AgarwalandEduardo Diaz 5ba7118db1 Updating Node version in Engines spec in package.json (#528)
* Updating Node version in package.json

Updated Node version from 0.12 to 1.4 in package.json engines

* Updated node version

Updated Node version from 0.12 to 4 in package.json Engines Spec

Fixes Issue #509
2018-10-22 20:30:43 +02:00
Tim OramandEduardo Diaz a4fcadd5b3 Implement async/sync tests for the aud claim (#535)
Refactor existing tests for the aud claim to use the async/sync test
helpers.
2018-10-17 11:37:29 +02:00
Tim OramandEduardo Diaz bb40b2103d Implement async/sync tests for nbf claim (#537)
Refactor the existing tests for the nbf claim to use the async/sync test
helpers. This required fixing a case where an error was improperly
handled for an async call.
2018-10-16 19:46:21 +02:00
Tim OramandEduardo Diaz da8a850628 Implement async/sync tests for exp claim (#536)
Refactor existing tests for the exp claim to use the async/sync test
helpers. This required fixing a case where an error was improperly
handled in the async case.
2018-10-16 18:57:20 +02:00
Tim OramandEduardo Diaz 86a40d8924 Implement async/sync tests for sub claim (#534)
Refactor existing tests for the sub claim to use the async/sync test
helpers.
2018-10-16 18:45:42 +02:00
Brian PloetzandEduardo Diaz 7cc9e94671 Document NotBeforeError (#529) 2018-10-10 15:41:57 -03:00
Tim OramandEduardo Diaz 5ecfc5402e Create and implement async/sync test helpers (#523)
It is difficult to write tests that ensure that both the asynchronous
and synchronous calls to the sign and verify functions had the same
result. These helpers ensure that the calls are the same and return the
common result.

As a proof of concept, the iat claim tests have been updated to use the
new helpers.
2018-10-10 15:37:34 -03:00
KundanandEduardo Diaz 2ecda9cfe0 Update README.md (#527) 2018-10-10 15:33:53 -03:00
Tim OramandEduardo Diaz 477e4f7426 Update dependencies used for running tests (#518)
Update chai and mocha to the latest versions and update nyc to the
latest version that supports Node 4.
2018-09-10 11:48:41 +02:00
Tim OramandEduardo Diaz cc7c764c64 Refactor tests related to iat and maxAge (#507)
This change extracts all tests related to the iat claim and the maxAge
verify option into two test files. Several additional tests are added
that were missing from the existing tests.
2018-08-26 12:52:15 +02:00
Tim OramandEduardo Diaz af874f5891 Refactor tests related to subject and sub (#505)
This change extracts all tests in the existing files related to the
subject option and sub claim into a single test file. Several other
tests are also added that were missing from the existing files.
2018-07-20 18:22:10 +02:00
Tim OramandEduardo Diaz 3d59ed478b Minor test refactoring for recently added tests (#504)
* Prefix claim- to claim related test files

* Fix typo of "signWithNoBfore" in notBefore tests
2018-07-20 18:14:02 +02:00
Tim OramandEduardo Diaz 86a39e7e9e Refactor tests related to audience and aud (#503)
This change extracts all tests in the existing test files related to
audience and aud into a single test file. Several other tests are also
added that were missing from the existing files.
2018-07-12 14:36:35 +02:00
Tim OramandEduardo Diaz 48edd0e3f7 Refactor tests related to expiresIn and exp (#501)
This change extracts all tests in the current test files related
to expiresIn and exp into a single test file. It also adds several
missing tests.
2018-07-06 23:40:49 +02:00
Tim OramandEduardo Diaz 6b0b47fc01 Refactor tests related to notBefore and nbf (#497)
This change extracts all tests in the current files related to notBefore
and nbf into a single test file. It also adds several missing related
tests.
2018-06-27 16:52:32 +02:00
Jaco KosterandEduardo Diaz d0ab5c5298 Make code-coverage mandatory when running tests (#495)
* Made code-coverage mandatory when running the tests.

* Missed the trailing-comma...
2018-06-25 22:49:15 +02:00
Tim OramandEduardo Diaz c86e573d16 Complete ESLint conversion and cleanup (#490)
* Add extension to ESLint config file

The .eslintrc file without an extension was deprecated a few years ago,
so this change renames the file to add the required extension.

See: https://github.com/eslint/eslint/commit/c9a8883d450d63a8d044a9e66d275f5b1973a3ba

* Add ESLint to package.json

This change adds ESLint as a dev-dependency and adds a lint script that
will run ESLint.

* Complete switch from JSHint to ESLint

Convert all the JSHint rules to the ESLint equivalents where possible.
The no-undef rule in ESLint caught a few cases of undefined usages in
the tests, so they were also fixed.

* Add a .eslintignore file

The HTML coverage report is currently being linted, which causes a lot
if invalid linting errors. This change adds a ignore file to ensure these
files are properly skipped during linting.
2018-06-25 19:54:04 +02:00
Tim OramandEduardo Diaz cc61447047 Use lolex for faking date in tests (#491)
Sinon.JS provides a project called lolex to handle faking dates. This
change replaces the fakeDate utility with the equivalent Sinon.JS code.
2018-06-16 18:36:05 +02:00
Jaco KosterandEduardo Diaz 7e40174623 Added Istanbul to check test-coverage (#468)
* Added Istanbul to check test-coverage

* node_modules_bak is generated and automatically removed by cost-of-modules and isn't needed in the ignore.
2018-06-16 12:44:54 +02:00
Eduardo Diaz 38d982b3cc 8.3.0 v8.3.0 2018-06-11 17:36:46 +02:00
Eduardo Diaz 78c8cb72d5 update changelog 2018-06-11 17:35:47 +02: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
Eduardo Diaz ca3cd60408 8.2.2 v8.2.2 2018-05-30 17:03:24 +02:00
Eduardo Diaz c4457360be update changelog 2018-05-30 17:01:35 +02:00
Eduardo DiazandLuciano Balmaceda 404b455fd5 deps: [email protected] (#477)
Update 'jws' dependency to latest to fix a security issue
2018-05-30 11:42:16 -03:00
Eduardo DiazandJason Strutz 76378b6edc add some clarifications (#473) 2018-05-23 09:27:06 -07:00
Eduardo DiazandJosé F. Romaniello f081aeffcf fix ci execution, remove not needed script (#472) 2018-05-22 12:15:22 -05:00
Josh UngerandEduardo Diaz e96b826066 Update README.md (#461) 2018-04-26 12:27:49 +02:00
Eduardo Diaz a05a4b3548 8.2.1 v8.2.1 2018-04-05 13:38:11 +02:00
Eduardo Diaz 31e0e8d2fc update changelog 2018-04-05 13:32:17 +02:00
Nicolas CognauxandEduardo Diaz e50764b070 Check payload is not null when decoded. (#444)
* Check payload is not null when decoded.
Fixed "Cannot read property 'nbf' of null"

* Condition on obj !== null for clarity

* Added test for decoding null token
2018-04-05 13:28:41 +02:00