376 Commits
Author SHA1 Message Date
Eduardo Diaz 8bc7d5b5e7 8.2.0 v8.2.0 2018-03-02 13:56:32 +01:00
Eduardo Diaz 5276392d58 update changelog 2018-03-02 13:56:17 +01:00
Jonathan Gros-DuboisandEduardo Diaz cab1c43ee4 Add a new mutatePayload option (#446)
This option allows you to keep a reference to the raw token payload after claims have been applied to it but before it has been encoded.
2018-03-02 13:48:25 +01:00
Eduardo Diaz 09a2b8e855 8.1.1 v8.1.1 2018-01-22 20:27:15 +01:00
Eduardo Diaz 3ac7a784a0 update changelog 2018-01-22 20:27:15 +01:00
Tim OramandEduardo Diaz 9f9d93b40e Not Before (nbf) calculated based on iat/timestamp (#437)
fix #435
2018-01-19 18:28:49 +01:00
Tim OramandEduardo Diaz a6422365ab Bump ms version to add support for negative numbers (#438) 2018-01-19 14:20:57 +01:00
Daniel SchmidtandEduardo Diaz c619575175 add newer node versions to build matrix (#428)
* add newer node versions to build matrix

* Dont test for node 9

Its not stable and seems to fail on travis
2018-01-10 22:38:47 +01:00
Harkirat SinghandEduardo Diaz bab4a35287 Minor typo (#424) 2017-11-17 17:20:04 +01:00
Eduardo Diaz 1101e00f1e 8.1.0 v8.1.0 2017-10-09 19:36:47 +02:00
Eduardo Diaz da4564ce6a update changelog 2017-10-09 19:36:35 +02:00
Jeff AlderandEduardo Diaz b848551927 #403: Clarify error wording. (#409)
* #403: Clarify error wording.

* #403: Improve wording for payload vs options
2017-10-09 19:29:48 +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
Jeff AlderandEduardo Diaz b00c459bc6 #402: Don't fail if captureStackTrace is not a function (#410) 2017-10-09 19:28:37 +02:00
Jeff AlderandEduardo Diaz a5e0c09c2d #385: Tweak README (#408)
* #385: Tweak README

* #385 Further wording tweaks for consistency.
2017-10-09 13:57:02 +02:00
oughterandEduardo Diaz 04a88aba0d Fix typo in 'options.header' reference; Update Buffer() example to use recommended method (#380) 2017-09-15 11:31:21 +02:00
Eduardo Diaz b3dc03e170 8.0.1 v8.0.1 2017-09-12 12:55:34 +02:00
Eduardo Diaz 0c3b67b9ab update changelog 2017-09-12 12:55:22 +02:00
Tomas ChmelevskijandEduardo Diaz 8fe1f3f44f Remove lodash.isarray dependency (#394) 2017-09-12 12:52:22 +02:00
Eduardo Diaz 96188a9990 8.0.0 v8.0.0 2017-09-06 17:45:05 +02:00
Eduardo Diaz 0e2b2c6a78 updated changelog 2017-09-06 17:44:49 +02:00
Germán LenaandGitHub 4ead059855 Merge pull request #393 from ziluvatar/migration-notes-to-readme
docs: readme, migration notes
2017-09-06 12:37:11 -03:00
Eduardo Diaz 8d37ed85a3 docs: readme, migration notes 2017-09-06 16:49:06 +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
Jorrit SchippersandEduardo Diaz 80b0f8535f Reduce size of NPM package (#347) 2017-09-06 16:36:01 +02:00
Chris PriceandEduardo Diaz 75b897b11d Remove joi to shrink module size (#348)
* Add cost-of-modules report to npm test

Results before any changes

┌─────────────┬────────────┬───────┐
│ name        │ children   │ size  │
├─────────────┼────────────┼───────┤
│ joi         │ 4          │ 3.12M │ <--!!!
├─────────────┼────────────┼───────┤
│ jws         │ 5          │ 0.18M │
├─────────────┼────────────┼───────┤
│ lodash.once │ 0          │ 0.01M │
├─────────────┼────────────┼───────┤
│ ms          │ 0          │ 0.01M │
├─────────────┼────────────┼───────┤
│ xtend       │ 0          │ 0.00M │
├─────────────┼────────────┼───────┤
│ 5 modules   │ 9 children │ 3.32M │
└─────────────┴────────────┴───────┘

* Replace joi with bespoke validator based on lodash

Dramatically reduces the module size without breaking ES5 compatability -

┌──────────────────────┬────────────┬───────┐
│ name                 │ children   │ size  │
├──────────────────────┼────────────┼───────┤
│ jws                  │ 5          │ 0.18M │
├──────────────────────┼────────────┼───────┤
│ lodash.includes      │ 0          │ 0.02M │
├──────────────────────┼────────────┼───────┤
│ lodash.once          │ 0          │ 0.01M │
├──────────────────────┼────────────┼───────┤
│ lodash.isinteger     │ 0          │ 0.01M │
├──────────────────────┼────────────┼───────┤
│ ms                   │ 0          │ 0.01M │
├──────────────────────┼────────────┼───────┤
│ lodash.isplainobject │ 0          │ 0.01M │
├──────────────────────┼────────────┼───────┤
│ xtend                │ 0          │ 0.00M │
├──────────────────────┼────────────┼───────┤
│ lodash.isstring      │ 0          │ 0.00M │
├──────────────────────┼────────────┼───────┤
│ lodash.isboolean     │ 0          │ 0.00M │
├──────────────────────┼────────────┼───────┤
│ lodash.isnumber      │ 0          │ 0.00M │
├──────────────────────┼────────────┼───────┤
│ lodash.isarray       │ 0          │ 0.00M │
├──────────────────────┼────────────┼───────┤
│ 11 modules           │ 5 children │ 0.25M │
└──────────────────────┴────────────┴───────┘

* Enhance validator error messages and add tests
2017-09-06 16:24:55 +02:00
Eduardo Diaz 23cb6f1d24 maxAge: Add validation to timespan result 2017-08-29 12:24:08 +02:00
Eduardo Diaz be10962135 update changelog 2017-08-17 16:21:21 +02:00
Eduardo Diaz 27771716b5 7.4.3 v7.4.3 2017-08-17 16:18:23 +02:00
Fredrik LiljegrenandGitHub 00b19d591b Merge pull request #386 from ziluvatar/issue_381
Fix breaking change on 7.4.2 for empty secret + "none" algorithm (sync code style)
2017-08-17 14:28:20 +02:00
Eduardo Diaz d63c87dc7c add test & modify guard code 2017-08-17 13:50:26 +02:00
Rhys Anthony McCaig 7ff56f77f3 Fixed alg non + secret set unit test 2017-08-11 17:32:06 -07:00
Rhys Anthony McCaig 95e73a269a Fix for #381. Set secret string before using jws when alg is none 2017-08-11 17:25:55 -07:00
Eduardo Diaz 57e97dbcb0 update changelog 2017-08-04 14:36:03 +02:00
Eduardo Diaz ee20a9e200 7.4.2 v7.4.2 2017-08-04 14:33:50 +02:00
José F. RomanielloandGitHub 36b6342170 Merge pull request #374 from ziluvatar/add-check-for-empty-secrets
sign: add check to be sure secret has a value
2017-08-04 09:31:49 -03:00
Eduardo Diaz 4cc2615033 sign: add check to be sure secret has a value 2017-07-24 16:59:07 -05:00
Fredrik LiljegrenandGitHub 93c2a4af49 Merge pull request #371 from ziluvatar/docs-about-refreshing-tokens
docs: about refreshing tokens
2017-07-14 13:57:26 +02:00
Eduardo Diaz 18137809c9 docs: about refreshing tokens 2017-07-14 13:21:57 +02:00
Fredrik LiljegrenandGitHub ff77aa1b33 Merge pull request #365 from ziluvatar/information-regarding-base64-secrets
docs: verifying with base64 encoded secrets
2017-06-27 11:49:16 +02:00
Eduardo Diaz 5c47d0deee docs: verifying with base64 encoded secrets 2017-06-24 11:44:14 +02:00
Fredrik LiljegrenandGitHub 512a02c4dc Merge pull request #360 from ziluvatar/add-ecdsa-tests
Add tests for ES256
2017-06-14 18:22:58 +02:00
rjruizesandEduardo Diaz c797714223 document keyid as option (#361) 2017-06-14 13:27:47 +02:00
Eduardo Diaz 7ca537e2bf Add tests for ES256 2017-06-11 13:18:50 +02:00
Eduardo DiazandGitHub 61c9aa7408 readme: Using private key with passpharase (#353) 2017-05-23 11:35:20 +02:00
Eduardo Diaz 1d196e9a2a update changelog 2017-05-17 11:34:11 +02:00
Eduardo Diaz a3f364a4d2 7.4.1 v7.4.1 2017-05-17 11:30:53 +02:00
Dominykas BlyžėandEduardo Diaz d194df0171 bump ms to v2 due a ReDoS vuln (#352)
[email protected] is vulnerable to a ReDoS attack: https://snyk.io/vuln/npm:ms:20170412

Looking at the code, the breaking change in [email protected] that the accepted string is now limited to 100 chars.
2017-05-17 11:29:48 +02:00
Eduardo Diaz 543bf7f71d maxAge: Fix logic with number + use seconds instead of ms 2017-05-13 17:29:19 +02:00