69 Commits
Author SHA1 Message Date
José F. Romaniello d78659fe58 6.1.2 2016-04-29 08:57:09 -03:00
José F. Romaniello 9c38374142 fix sign method for node.js 0.12. closes #193 2016-04-29 08:57:06 -03:00
José F. Romaniello 252110e410 6.1.1 2016-04-28 19:55:10 -03:00
José F. Romaniello 75c50a2414 6.1.0 2016-04-27 13:23:24 -03:00
José F. Romaniello 2736ac2654 6.0.1 2016-04-27 12:50:10 -03:00
José F. Romaniello fc5cf65493 6.0.0 2016-04-27 12:40:55 -03:00
José F. Romaniello 53c3987b3c Improved the sign method
Notable changes:

1.  `expiresInMinutes` and `expiresInSeconds` are deprecated and no longer supported.
2.  `notBeforeInMinutes` and `notBeforeInSeconds` are deprecated and no longer supported.
3.  options are properly validated.
4.  `options.expiresIn`, `options.notBefore`, `options.audience`, `options.issuer`, `options.subject` and `options.jwtid` are mutually exclusive with `payload.exp`, `payload.nbf`, `payload.aud`, `payload.iss`, `payload.sub` and `payload.jti` respectively.
5.  `options.algorithm` is properly validated.
6.  `options.headers` is renamed to `options.header`.
2016-04-27 12:40:28 -03:00
José F. Romaniello b87a1a8d2e update CHANGELOG to reflect most of the changes. closes #136 2016-02-16 10:48:56 -03:00
José F. Romaniello cb33aabc43 5.7.0 2016-02-16 09:23:44 -03:00
José F. Romaniello 195940409e 5.6.2 2016-02-16 08:59:30 -03:00
José F. Romaniello 06d8209d49 5.6.1 2016-02-16 08:59:19 -03:00
José F. Romaniello ae13271837 5.6.0 2016-02-16 08:49:00 -03:00
José F. Romaniello 10266c1392 5.5.4 2016-01-04 12:43:16 -03:00
José F. Romaniello 04a76d51f1 5.5.3 2016-01-04 09:31:53 -03:00
José F. Romaniello e403a66bee 5.5.2 2016-01-04 09:06:00 -03:00
José F. Romaniello be9c09af83 fix signing method with sealed objects, do not modify the params object. closes #147 2016-01-04 09:05:57 -03:00
José F. Romaniello 42145bc6ef 5.5.1 2016-01-04 08:53:31 -03:00
José F. Romaniello 786d37b299 fix nbf verification. fix #152 2016-01-04 08:53:25 -03:00
José F. Romaniello f1fb176a15 5.5.0 2015-12-28 14:11:10 -03:00
Rodrigo López Dato eb272d6da0 5.4.1 2015-10-26 15:09:27 -03:00
José F. Romaniello c7e34bb4fd 5.4.0 2015-10-02 08:14:33 -03:00
José F. Romaniello 4b70ae3012 5.3.1 2015-10-02 08:10:43 -03:00
José F. Romaniello 5d559ced3f 5.3.0 2015-10-02 08:10:34 -03:00
José F. Romaniello eb3a6bf174 5.2.0 2015-10-02 08:09:21 -03:00
José F. Romaniello 8e89ee4f57 Merge branch 'max-age' of https://github.com/jden/node-jsonwebtoken into jden-max-age 2015-10-02 08:07:55 -03:00
José F. Romaniello 83d7aff9fb 5.1.0 2015-10-02 07:56:19 -03:00
José F. Romaniello 6a715a1399 5.0.5 2015-08-19 10:27:30 -03:00
jden f13b3fb7f2 add ms dep to package.json 2015-07-15 22:00:11 -07:00
jden d7c5793d98 add tests for verify expires 2015-07-15 21:03:00 -07:00
José F. Romaniello 7b9f509641 5.0.4 2015-07-15 09:01:01 -03:00
José F. Romaniello 815a1a1663 5.0.3 2015-07-15 08:57:57 -03:00
José F. Romaniello 118ff1a7ba 5.0.2 2015-06-15 07:26:33 -05:00
Jared Hanson 214b9c435f Bump version to 5.0.1. 2015-05-15 15:00:30 -07:00
Alberto Pose db8fb93ad7 5.0.0 2015-04-10 17:48:02 -03:00
Alberto Pose 1e46234201 Updating to jws@^3.0.0
As `[email protected]` changed the verify method signature to be `jws.verify(signature, algorithm, secretOrKey)`, the token header must be decoded first in order to make sure that the `alg` field matches one of the allowed `options.algorithms`. After that, the now validated `header.alg` is passed to `jws.verify`

As the order of steps has changed, the error that was thrown when the JWT was invalid is no longer the `jws` one:

{ [Error: Invalid token: no header in signature 'a.b.c'] code: 'MISSING_HEADER', signature: 'a.b.c' }

That old error (removed from jws) has been replaced by a `JsonWebTokenError` with message `invalid token`. That's why this change will bump be a major.
2015-04-10 12:38:41 -03:00
José F. Romaniello e46ca66344 4.2.2 2015-03-26 16:44:53 -03:00
José F. Romaniello 4d22d08da2 4.2.1 2015-03-17 13:17:03 -03:00
José F. Romaniello 7863a84b1d 4.2.0 2015-03-16 20:38:43 -03:00
José F. Romaniello b69d441c6e 4.1.0 2015-03-10 14:00:09 -03:00
José F. Romaniello db1cb1c864 4.0.0 2015-03-06 12:10:44 -03:00
José F. Romaniello 92d33bd99a this is a major change, it changes the default encoding from binary to utf8 2015-03-06 09:09:46 -03:00
Alberto Pose 8d7b90e799 3.2.2 2015-01-15 12:00:25 -03:00
Alberto Pose 89ec214008 Updating jws to 1.0.1 2015-01-15 12:00:09 -03:00
José F. Romaniello 41cc7b7d87 3.2.1 2015-01-08 08:55:40 -03:00
José F. Romaniello fb3183e83b fix engines section 2015-01-08 08:55:35 -03:00
José F. Romaniello 5e1c03fb90 3.2.0 2014-12-29 16:11:14 -03:00
José F. Romaniello 32702c25bd 3.1.1 2014-12-29 14:20:44 -03:00
José F. Romaniello 3854502087 3.1.0 2014-12-29 13:29:29 -03:00
José F. Romaniello 1076414a09 3.0.0 2014-12-29 13:06:24 -03:00
José F. Romaniello b6483581c4 fix encoding issue. closes #40 2014-12-29 13:01:12 -03:00