UserAuthenticatorInterface.php 896 B

12345678910111213141516171819202122232425262728293031
  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\Authentication;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\Component\HttpFoundation\Response;
  13. use Symfony\Component\Security\Core\User\UserInterface;
  14. use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
  15. /**
  16. * @author Wouter de Jong <wouter@wouterj.nl>
  17. *
  18. * @experimental in 5.2
  19. */
  20. interface UserAuthenticatorInterface
  21. {
  22. /**
  23. * Convenience method to programmatically login a user and return a
  24. * Response *if any* for success.
  25. */
  26. public function authenticateUser(UserInterface $user, AuthenticatorInterface $authenticator, Request $request): ?Response;
  27. }