witoldsz / angular-http-auth

MIT License
2.38k stars 417 forks source link

Any chance of a more complete doc? #14

Closed drozzy closed 11 years ago

drozzy commented 11 years ago

Any chance of a more complete doc or fuller example (with controller)?

Thanks

witoldsz commented 11 years ago

Did you see demo application?

Regards,

Witold Szczerba

Sent from my mobile phone. On Mar 22, 2013 1:20 AM, "drozzy" notifications@github.com wrote:

Any chance of a more complete doc or fuller example (with controller)?

Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/witoldsz/angular-http-auth/issues/14 .

drozzy commented 11 years ago

Yes! But it is still too complicated :-) I was hoping for a "tutorial" style doc - but I guess that's too time consuming. For example, I am not sure why you need to store and retry all the requests at all... instead of just throwing them away.. what's the advantage?

witoldsz commented 11 years ago

You can either store them and retry later (when user logs in again) or you have to reject them. In first case your controllers or services are not aware of any obstacles that had happened. There is no need to handle 401 errors in each and every possible place in code. This is not the case if you reject requests due to 401 error.