I could give you an idea of how you can achieve this through the execution unit.
app.run(function (StateInterceptor, FPSSO, HTTPResponseCode, $state, SessionManager, notifications, Utils, $timeout) {
StateInterceptor.startService();
var httpSecurityInterceptor = function(response, deferred){
var propagatePromise = true;
switch(response.status){
case HTTPResponseCode.UNAUTHORIZED:
SessionManager.Logout();
notifications.showErrorMessage("Your session has expired. Please sign in again.", "Error");
$state.go('Logout', {isLogout: true, returnUrl: $state.current.name});
propagatePromise = false;
break;
default:
var res = Utils.ExtractResponse(response);
res.status = response.status;
deferred.reject(res);
}
return propagatePromise;
}
FPSSO.API.setErrorInterceptor(httpSecurityInterceptor);
, switch $state.current "". , , , .
- .