jwt-decode
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var base64_url_decode = require('./base64_url_decode'); | ||
@@ -5,3 +7,7 @@ var json_parse = require('./json_parse'); | ||
module.exports = function (token) { | ||
if (!token) { | ||
throw new Error('Invalid token specified'); | ||
} | ||
return json_parse(base64_url_decode(token.split('.')[1])); | ||
}; | ||
}; |
{ | ||
"name": "jwt-decode", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Decode JWT tokens, mostly useful for browser applications.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -26,2 +26,4 @@ __jwt-decode__ is a small browser library that helps decoding JWTs token which are Base64Url encoded. | ||
**Note:** A falsy token will throw an error. | ||
## Develop | ||
@@ -28,0 +30,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22665
287
43