Now, when performing an authenticated API call an authorization error could occur (main for malformed token or expired token).
How to recognize errors from response? [-> @pdonorio ]
How to raise the error to the user to request for a new authentication? [we need a general global errors bucket in the angularjs page to show errors/warnings/alert/info/etc]
How to sync cookies and token: at the moment i have an expired token in a valid cookie, we need to invalidate the cookie once the token is no longer valid (to be implemented after the previous point)
Now, when performing an authenticated API call an authorization error could occur (main for malformed token or expired token).