/**
* {@inheritDoc}
*/
public function fail(UserInterface $user = null)
{
// We'll check throttling firstly from any previous attempts. This
// will throw the required exceptions if the user has already
// tried to login too many times.
$this->checkThrottling('login', $user);
// Now we've checked previous attempts, we'll log this latest attempt.
// It'll be picked up the next time if the user tries again.
$this->throttle->log($this->ipAddress, $user);
}