AuthenticationEvents.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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;
  11. use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
  12. use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent;
  13. final class AuthenticationEvents
  14. {
  15. /**
  16. * The AUTHENTICATION_SUCCESS event occurs after a user is authenticated
  17. * by one provider.
  18. *
  19. * @Event("Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent")
  20. */
  21. public const AUTHENTICATION_SUCCESS = 'security.authentication.success';
  22. /**
  23. * The AUTHENTICATION_FAILURE event occurs after a user cannot be
  24. * authenticated by any of the providers.
  25. *
  26. * @Event("Symfony\Component\Security\Core\Event\AuthenticationFailureEvent")
  27. */
  28. public const AUTHENTICATION_FAILURE = 'security.authentication.failure';
  29. /**
  30. * Event aliases.
  31. *
  32. * These aliases can be consumed by RegisterListenersPass.
  33. */
  34. public const ALIASES = [
  35. AuthenticationSuccessEvent::class => self::AUTHENTICATION_SUCCESS,
  36. AuthenticationFailureEvent::class => self::AUTHENTICATION_FAILURE,
  37. ];
  38. }