Files
node-jsonwebtoken/test
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
..
2016-01-04 08:53:25 -03:00
2016-07-12 09:49:04 -03:00
2013-06-30 22:27:13 -03:00
2016-01-04 09:16:57 -03:00
2016-04-27 12:40:28 -03:00
2016-04-27 12:40:28 -03:00
2013-06-30 22:27:13 -03:00
2013-06-30 22:27:13 -03:00
2016-04-27 12:40:28 -03:00
2015-04-21 13:06:24 +02:00