summaryrefslogtreecommitdiffstats
path: root/afm-client/app/Frontend/widgets
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 /afm-client/app/Frontend/widgets
parenta79d1fc845f31cda41b55b0ffb9aa807732bbcd0 (diff)
Fixed Mutiple AutoStart Call and Refresh Token
Diffstat (limited to 'afm-client/app/Frontend/widgets')
-rw-r--r--afm-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js8
1 files changed, 4 insertions, 4 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();