--
You received this message because you are subscribed to the Google Groups "angular" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
We're having a similar issue with http status code 302. We're building an AngularJS App. Authentication is done by a third party proxy who will return http status 302 and redirect to login when the user is not logged in... Unfortunately we cannot change this behaviour as other applications behind the proxy rely on this redirect. Do you have any idea how we could solve this?
As far as I understand there's no way I can handle status 302 in an AngularJS application (https://groups.google.com/forum/#!topic/angular/GKkdipdMbdo), am I right?
A solution offered by the proxy development team was, that they could offer a special servlet that will tell us wether we're logged in or not (and return e.g. status 401). So we would have to make this servlet call before EVERY other rest call from our AngularJS application...
What do you think about this?
Cheers
Michael
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/GKkdipdMbdo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.
The response object in AngularJS looks like this:Object {data: "", status: 0, headers: function, config: Object}What I would expect is status code 302 and even the redirect location, so that I could handle the redirect to the login-page in Angular myself...
What I could do is implement an httpInterceptor which will handle response errors with status code 0. As soon as I get such a response I could trigger a $window.location.reload. This would again trigger the proxy and he would redirect us to the login page.