Tokens are now valid for a week

This commit is contained in:
Johannes Zellner
2016-08-01 10:14:45 +02:00
parent ce28449734
commit f60ff45cb6
7 changed files with 14 additions and 8 deletions

View File

@@ -250,7 +250,7 @@ function activate(username, password, email, displayName, ip, auditSource, callb
// Also generate a token so the admin creation can also act as a login
var token = tokendb.generateToken();
var expires = Date.now() + 24 * 60 * 60 * 1000; // 1 day
var expires = Date.now() + constants.DEFAULT_TOKEN_EXPIRATION;
tokendb.add(token, userObject.id, result.id, expires, '*', function (error) {
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));