diff --git a/lib/server/authMiddleware.js b/lib/server/authMiddleware.js index e9f68c7..fe70125 100644 --- a/lib/server/authMiddleware.js +++ b/lib/server/authMiddleware.js @@ -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); diff --git a/lib/tools/phantomasWrapper.js b/lib/tools/phantomasWrapper.js index adb3dd7..8dbd614 100644 --- a/lib/tools/phantomasWrapper.js +++ b/lib/tools/phantomasWrapper.js @@ -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; diff --git a/test/api/apiTest.js b/test/api/apiTest.js index e2469a0..dacc553 100644 --- a/test/api/apiTest.js +++ b/test/api/apiTest.js @@ -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';