Add full login functionality
Change-Id: I33a9df05b2cad2015c7ccd16580b560d85aefe13
Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
diff --git a/src/js/app.js b/src/js/app.js
index f19efae..7ba15cd 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -37,6 +37,10 @@
'redirectTo': '/login'
});
}])
+ .config(['$httpProvider', function($httpProvider){
+ //console.log($httpProvider.interceptors);
+ $httpProvider.interceptors.push('apiInterceptor');
+ }])
.run(['$rootScope', '$location', 'dataService', 'userModel',
function($rootScope, $location, dataService, userModel){
$rootScope.dataService = dataService;
@@ -71,5 +75,10 @@
dataService.showNavigation = false;
}
});
+
+ $rootScope.$on('timedout-user', function(){
+ sessionStorage.removeItem('LOGIN_ID');
+ $location.path('/login');
+ });
}
]);