InteractiveLoginEvent.php 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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\Event;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
  13. use Symfony\Contracts\EventDispatcher\Event;
  14. /**
  15. * @author Fabien Potencier <fabien@symfony.com>
  16. */
  17. final class InteractiveLoginEvent extends Event
  18. {
  19. private $request;
  20. private $authenticationToken;
  21. public function __construct(Request $request, TokenInterface $authenticationToken)
  22. {
  23. $this->request = $request;
  24. $this->authenticationToken = $authenticationToken;
  25. }
  26. public function getRequest(): Request
  27. {
  28. return $this->request;
  29. }
  30. public function getAuthenticationToken(): TokenInterface
  31. {
  32. return $this->authenticationToken;
  33. }
  34. }