vendor/symfony/security-core/Event/AuthenticationFailureEvent.php line 18

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Security\Core\Event;
  11. use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
  12. use Symfony\Component\Security\Core\Exception\AuthenticationException;
  13. use Symfony\Component\Security\Http\Event\LoginFailureEvent;
  14. trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" with the new authenticator system instead.', AuthenticationFailureEvent::class, LoginFailureEvent::class);
  15. /**
  16. * This event is dispatched on authentication failure.
  17. *
  18. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  19. *
  20. * @deprecated since Symfony 5.3, use LoginFailureEvent with the new authenticator system instead
  21. */
  22. final class AuthenticationFailureEvent extends AuthenticationEvent
  23. {
  24. private $authenticationException;
  25. public function __construct(TokenInterface $token, AuthenticationException $ex)
  26. {
  27. parent::__construct($token);
  28. $this->authenticationException = $ex;
  29. }
  30. public function getAuthenticationException(): AuthenticationException
  31. {
  32. return $this->authenticationException;
  33. }
  34. }