witoldsz / angular-http-auth

MIT License
2.38k stars 417 forks source link

adding 403 as possible response code to trigger a loginRequired event #78

Closed psalami closed 9 years ago

psalami commented 9 years ago

the HTTP spec does not specify 403 as a valid response code for requests that require authentication, but the Django server (and maybe others?) sends 403 for requests that failed because the user was not authenticated

witoldsz commented 9 years ago

See #77 comment. I will not adapt this generic module to your special case. Next day someone would come and request a change, because their server throws 456 code on login request and what should I tell them?

fergalmoran commented 8 years ago

I think this should be merged. I don't think that a 403 is a "special case" - is it? I'm using JWT and my server returns a 403 if the JWT is expired - adding this change would have saved me hours of frustration.

witoldsz commented 8 years ago

The 403 response is supported for long time, this is very old pull-request, it changes the lines which does not exist anymore.

Just look at the current code to see how it handles 403s.