angular-http-auth icon indicating copy to clipboard operation
angular-http-auth copied to clipboard

Suggestion: add loginFailed

Open Rykus0 opened this issue 11 years ago • 0 comments

I think It would be helpful to have a loginFailed routine that did not clear the buffer, and broadcast a message indicating a failed login attempt.

Mostly because the other related messages are controlled from the authService, so it makes sense to group them together. It would probably be invoked by an external module.

For example: I open a modal login box on event:auth-loginConfirmed. If I receive this event again while the modal is still open, I know the login failed (just using basic auth and getting a 401 when attempting with the credentials). I could call loginFailed to broadcast an event that could be used to display an error and maybe increment a failed attempt counter...

I'm short on time this week, but I can probably add this in next week and send a pull request.

Rykus0 avatar Aug 15 '14 20:08 Rykus0