Fix Auth token

This commit is contained in:
Gaël Métais
2014-12-10 08:16:11 +01:00
parent 49015e3422
commit 84faabca86
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ function isTokenValid(token) {
var data = null;
try {
jwt.decode(token, config.tokenSalt);
data = jwt.decode(token, config.tokenSalt);
} catch(err) {
debug('Error while decoding token');
debug(err);
+2 -2
View File
@@ -58,10 +58,10 @@ var PhantomasWrapper = function() {
// Kill the application if nothing happens for 10 minutes
var killer = setTimeout(function() {
debug('Killing the app because the test on ' + task.url + ' was launched 10 minutes ago');
debug('Killing the app because the test on %s was launched %d seconds ago', task.url, 3*options.timeout);
// If in server mode, forever will restart the server
process.exit(1);
}, 600000);
}, 3*options.timeout*60*1000);
// It's time to launch the test!!!
var triesNumber = 2;
+3 -3
View File
@@ -4,10 +4,10 @@ var jwt = require('jwt-simple');
var config = {
"authorizedKeys": {
"1234567890": "test@test.com"
"1234567890": "contact@gaelmetais.com"
},
"tokenSalt": "test-salt",
"authorizedApplications": ["wooot"]
"tokenSalt": "lake-city",
"authorizedApplications": ["frontend"]
};
var apiUrl = 'http://localhost:8387/api';