- scope.tkcreate = function() {
-
- AppCall.get ("token", "create", {token: AppConfig.session.initial},function(result) {
- if (result.status === 200) scope.onsuccess (result.data);
- else scope.onerror();
- });
- };
+ scope.loggin = function() {
+ AppCall.get (scope.plugin, "connect", {token: AppConfig.session.initial}, function(jresp, errcode) {
+
+ if (!scope.onsuccess (jresp, errcode)) return;
+
+ // Intial token was accepted let's start ping & refresh
+ $timeout (scope.getping, AppConfig.session.pingrate*1000);
+ $timeout (scope.refresh, AppConfig.session.timeout *250);