jsonwebtoken
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -12,6 +12,6 @@ var jws = require('jws'); | ||
payload.iat = Date.now(); | ||
payload.iat = Math.round(Date.now() / 1000); | ||
if (options.expiresInMinutes) { | ||
var ms = options.expiresInMinutes * 60 * 1000; | ||
var ms = options.expiresInMinutes * 60; | ||
payload.exp = payload.iat + ms; | ||
@@ -52,3 +52,3 @@ } | ||
if (payload.exp) { | ||
if (Date.now() >= payload.exp) | ||
if (Math.round(Date.now()) / 1000 >= payload.exp) | ||
return callback(new Error('jwt expired')); | ||
@@ -55,0 +55,0 @@ } |
{ | ||
"name": "jsonwebtoken", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "JSON Web Token implementation (symmetric and asymmetric)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
16018