Skip to content

Commit

Permalink
Se agrega variable de configuracion de tiempo de expiracion de token
Browse files Browse the repository at this point in the history
  • Loading branch information
raicerk committed Jul 7, 2017
1 parent 7d2ef9f commit 50747f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ module.exports = {
domain: 'http://localhost',
puerto: 3000,
nombredb: 'pjwt',
jwt_secreto : 'df4d85d3b36b38a491191b9f8f0e4a76'
jwt_secreto : 'df4d85d3b36b38a491191b9f8f0e4a76',
jwt_expiracion : '1m';
};
2 changes: 1 addition & 1 deletion controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports.logear = function(req, res) {
console.log(user);

let token = jwt.sign(user, config.jwt_secreto, {
expiresIn: '1m' // expires in 1 hour
expiresIn: config.jwt_expiracion // expires in 1 hour
});

res.json({
Expand Down

0 comments on commit 50747f1

Please sign in to comment.