Inheritance: extends Neos\Flow\Security\Exception
 /**
  * Is called if authentication failed.
  *
  * Override this method in your login controller to take any
  * custom action for this event. Most likely you would want
  * to redirect to some action showing the login form again.
  *
  * @param AuthenticationRequiredException $exception The exception thrown while the authentication process
  * @return void
  */
 protected function onAuthenticationFailure(AuthenticationRequiredException $exception = null)
 {
     $this->flashMessageContainer->addMessage(new Error('Authentication failed!', $exception === null ? 1347016771 : $exception->getCode()));
 }
 /**
  * Is called if authentication failed.
  *
  * @param AuthenticationRequiredException $exception The exception thrown while the authentication process
  * @return void
  */
 protected function onAuthenticationFailure(AuthenticationRequiredException $exception = null)
 {
     if ($this->view instanceof JsonView) {
         $this->view->assign('value', array('success' => false));
     } else {
         $this->addFlashMessage('The entered username or password was wrong', 'Wrong credentials', Message::SEVERITY_ERROR, array(), $exception === null ? 1347016771 : $exception->getCode());
     }
 }