SecurityEvents.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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\Http;
  11. use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
  12. use Symfony\Component\Security\Http\Event\SwitchUserEvent;
  13. final class SecurityEvents
  14. {
  15. /**
  16. * The INTERACTIVE_LOGIN event occurs after a user has actively logged
  17. * into your website. It is important to distinguish this action from
  18. * non-interactive authentication methods, such as:
  19. * - authentication based on your session.
  20. * - authentication using an HTTP basic or HTTP digest header.
  21. *
  22. * @Event("Symfony\Component\Security\Http\Event\InteractiveLoginEvent")
  23. */
  24. public const INTERACTIVE_LOGIN = 'security.interactive_login';
  25. /**
  26. * The SWITCH_USER event occurs before switch to another user and
  27. * before exit from an already switched user.
  28. *
  29. * @Event("Symfony\Component\Security\Http\Event\SwitchUserEvent")
  30. */
  31. public const SWITCH_USER = 'security.switch_user';
  32. /**
  33. * Event aliases.
  34. *
  35. * These aliases can be consumed by RegisterListenersPass.
  36. */
  37. public const ALIASES = [
  38. InteractiveLoginEvent::class => self::INTERACTIVE_LOGIN,
  39. SwitchUserEvent::class => self::SWITCH_USER,
  40. ];
  41. }