357 Commits
Author SHA1 Message Date
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
Eduardo Diaz 2cab40aec0 Update changelog 2017-04-24 19:18:15 +02:00
Eduardo Diaz 045390c28c 7.4.0 v7.4.0 2017-04-24 19:15:10 +02:00
Fredrik LiljegrenandGitHub 3d1bc90d16 Merge pull request #328 from ziluvatar/npb-exp-iat-docs-numeric-date
Add docs about numeric date fields.
2017-03-22 09:06:33 +01:00
Eduardo Diaz 7a2e46a815 Add docs about numeric date fields 2017-03-21 17:23:24 +01:00
José F. RomanielloandGitHub ce11416480 Merge pull request #320 from ziluvatar/make-options-optional-on-async-call
Make Options object optional for callback-ish sign
2017-03-09 14:33:53 -03:00
Eduardo Diaz 87d9e777ed Make Options object optional for callback-ish sign 2017-03-08 14:09:04 +01:00
Eduardo DiazandEduardo Diaz 261a464a92 Update changelog 2017-02-20 21:33:45 +01:00
Eduardo Diaz aeaf2e8d2a 7.3.0 v7.3.0 2017-02-13 19:39:18 +01:00
Eduardo DiazandGitHub 70cab0e2c0 Add more information to maxAge option in README 2017-02-13 13:50:55 +01: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
Eddy VerbruggenandEduardo Diaz a7d15fe138 Fixed a simple typo (#287)
* Fixed a simple typo

The example didn't work because of a missing comma.

* Fixed a simple typo

The example didn't work because of a missing comma.
2017-02-03 22:39:08 +01:00
Ricardo GamaandEduardo Diaz c4f7670972 Fix handling non string tokens (#305) 2017-02-03 21:07:54 +01:00
Greg WaldenandEduardo Diaz 57c25955ff rauchg/ms.js changed to zeit/ms (#303)
* rauchg/ms.js changed to zeit/ms

* Update README.md
2017-02-03 19:38:42 +01:00
José F. Romaniello 96dc31f5af update changelog 2016-12-07 11:03:16 -03:00
José F. Romaniello bf6bedc4ba 7.2.1 v7.2.1 2016-12-07 11:02:36 -03:00
José F. Romaniello 790cc72894 add nsp check to find vulnerabilities on npm test 2016-12-07 11:02:32 -03:00
José F. Romaniello d0ea609426 revert to joi@^6 to keep ES5 compatibility 2016-12-07 10:59:23 -03:00
José F. Romaniello d409f20b86 update changelog 2016-12-06 09:43:57 -03:00