summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2016-02-12 17:46:35 +0100
committerFulup Ar Foll <fulup@iot.bzh>2016-02-12 17:46:35 +0100
commit366fed15806599678b05929f54318983def6001b (patch)
tree8fe71412b8ae2ffe4d46a16b0a20d8dacf3b8b94
parenta79d1fc845f31cda41b55b0ffb9aa807732bbcd0 (diff)
Fixed Mutiple AutoStart Call and Refresh Token
-rw-r--r--afm-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js8
-rw-r--r--afm-client/app/etc/AppDefaults.js2
2 files changed, 5 insertions, 5 deletions
diff --git a/afm-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js b/afm-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js
index a7ee13f..47c4410 100644
--- a/afm-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js
+++ b/afm-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js
@@ -60,11 +60,11 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification'])
};
scope.onsuccess = function(data, errcode, headers, config) {
+ if (data.request.token) AppConfig.session.token = data.request.token;
+ if (data.request.uuid) AppConfig.session.uuid = data.request.uuid;
+ if (data.request.timeout) AppConfig.session.timeout = data.request.timeout;
+
if (scope.logged !== true) {
- if (data.request.token) AppConfig.session.token = data.request.token;
- if (data.request.uuid) AppConfig.session.uuid = data.request.uuid;
- if (data.request.timeout) AppConfig.session.timeout = data.request.timeout;
-
Notification.success ({message: "AppFramework Binder Back to Live", delay: 3000});
scope.online();
if (scope.callback) scope.callback();
diff --git a/afm-client/app/etc/AppDefaults.js b/afm-client/app/etc/AppDefaults.js
index b0eb1a8..1825c45 100644
--- a/afm-client/app/etc/AppDefaults.js
+++ b/afm-client/app/etc/AppDefaults.js
@@ -32,7 +32,7 @@ config = {
UPLOAD_DIR: '/tmp/uploads', // directory destination for uploaded files [/api/post/upload]
// EXPRESS WEB server config [note: URLBASE generate rewriting rules]
- EXPRESS_HOST : 'localhost', // HTTP will only listen on related Internet interface
+ EXPRESS_HOST : '', // HTTP will only listen on related Internet interface
EXPRESS_PORT : 4000, // HTTP port
EXPRESS_LOGDIR : __dirname + '/../../log', // httpd log file
EXPRESS_SECRET : Math.random().toString(36).slice(2), // [default cookie session]