2
1
mirror of https://github.com/Thream/socketio-jwt.git synced 2024-07-21 09:38:31 +02:00

Fixed mocha tests by not using expiresInMinutes

Using `expiresInMinutes` leads to errors, as it was deprecated in
`jsonwebtoken` > 5.7.0.
We should use `expiresIn` instead.
This commit is contained in:
Root-Core 2017-04-19 00:33:26 +02:00
parent 4033483154
commit 250312152a
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"jsonwebtoken": "^5.7.0", "jsonwebtoken": "^7.3.0",
"xtend": "~4.0.1" "xtend": "~4.0.1"
}, },
"devDependencies": { "devDependencies": {

View File

@ -38,7 +38,7 @@ exports.start = function (options, callback) {
}; };
// We are sending the profile inside the token // We are sending the profile inside the token
var token = jwt.sign(profile, options.secret, { expiresInMinutes: 60*5 }); var token = jwt.sign(profile, options.secret, { expiresIn: 60*60*5 });
res.json({token: token}); res.json({token: token});
}); });

View File

@ -38,7 +38,7 @@ exports.start = function (callback) {
}; };
// We are sending the profile inside the token // We are sending the profile inside the token
var token = jwt.sign(profile, options.secret, { expiresInMinutes: 60*5 }); var token = jwt.sign(profile, options.secret, { expiresIn: 60*60*5 });
res.json({token: token}); res.json({token: token});
}); });