title: What is the quickest way to check invalid login attempts in Symfony2 FOSUserBundle?
body: <p>I am using FOSUserBundle in Symfony2 to handle user registration and authentication. I want <strong>lock out user accounts after three invalid login attempts</strong>. So, what is <strong>quickest way to check invalid login attempts</strong> in Symfony2 FOSUserBundle?</p>
  
  <p><em><strong>Solution so far</em></strong></p>
  
  <p>Maybe I have to define <code>$attempts</code> attribute on <code>User</code> object to identify the invalid login attempts count. Then I can use a <code>AuthenticationHandler</code> class to handle login attempt ( using onAuthenticationSuccess() and onAuthenticationFailure() )</p>