witoldsz / angular-http-auth

MIT License
2.38k stars 417 forks source link

adding 403/Forbidden and cancel support #27

Closed laurelnaiad closed 11 years ago

laurelnaiad commented 11 years ago

This is a nice idea.

I'm wondering how to support Canceling from the login "screen."

I was attempting to add 403/Forbidden support and working on a pull request for it.... and wanted to add a cancel button to the login screen... but it looks like the initial request that prompts the login to occur will keep trying to resolve until you actually log in -- is that true? Or am i missing something? Does the httpBuffer need to be cleared? Or a promise rejected?

laurelnaiad commented 11 years ago

I think you can disregard my concern about the initial request -- it looks like the issue was that the submit function on the controller was being invoked when pressing my (added) cancel button. I've tweaked the sample and now I don't see the call to auth/login when I press cancel... I need to figure out whether adding an httpBuffer.clear method actually had a part in solving that, then back to working on 403 support (and tweaking the demo app to test it).