X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=afb-client%2Fapp%2FFrontend%2Fwidgets%2FNotifications%2FTokenRefreshSvc.js;h=3e5e8d6cb22196244225b6b181264d81bda490be;hb=6d06a2a9a02906ce4c848540d74c3c5798688664;hp=4dff4c9423a0a83428b3736e1e548bb373f24364;hpb=c8a7784c665e1571400853c0c91b9c47be3ce86f;p=src%2Fapp-framework-demo.git diff --git a/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js b/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js index 4dff4c9..3e5e8d6 100644 --- a/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js +++ b/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js @@ -86,7 +86,7 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification']) // Check Binder status scope.getping = function() { - AppCall.get ("token", "ping", {/*query*/},function(jresp, errcode) { + AppCall.get (scope.plugin, "ping", {/*query*/},function(jresp, errcode) { if (errcode !== 200 || jresp.request.status !== "success") { Notification.warning ({message: jresp.request.info, delay: 5000}); scope.offline(); @@ -100,7 +100,7 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification']) // Check Binder status scope.refresh = function() { - AppCall.get ("token", "refresh", {/*query*/}, function(jresp, errcode) { + AppCall.get (scope.plugin, "refresh", {/*query*/}, function(jresp, errcode) { scope.onsuccess (jresp, errcode); @@ -111,7 +111,7 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification']) // Initial connection scope.loggin = function() { - AppCall.get ("token", "create", {token: AppConfig.session.initial}, function(jresp, errcode) { + AppCall.get (scope.plugin, "login", {token: AppConfig.session.initial}, function(jresp, errcode) { if (!scope.onsuccess (jresp, errcode)) return; @@ -124,6 +124,7 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification']) // Parse Widget Parameters + scope.plugin = attrs.plugin || "auth"; scope.icon = attrs.icon || "fi-lightbulb"; scope.hostname = $location.host(); scope.httpdport = $location.port();