Listening for failed login attempts via IdentityManager ("Account has been locked")

697
0
05-12-2014 03:49 AM
BabbageOcelot
New Contributor
Hello,

I hope this is a quick one, and I'm just having a failure reading the API docs. Is there a way to hook into the IdentityManager and analyse the error condition server response? Specifically, I've had some issues recently with users getting locked out from the underlying credential provider.

To be clear, all I want to do here is let the user know this is why they've been unable to log in. 'Account locked' is one of many potential error conditions.

I see in firebug a POST to the token service, and then a console.error output raised from within the jsapi code:

{
  "error":{
     "code":"200",
     "message":"Account has been locked.  Please contact your system administrator for further assistance.",
     "details":[]
   }
}


Is there any way of getting this and providing the user with a sane response? The IdentityManager defaults to a dialog showing "The username or password you entered is incorrect.", which plainly isn't true.

I'd expect an "on-error" event listener to be in there somewhere, but can't see one.

Cheers, Ben.
0 Kudos
0 Replies