AuthenticationProviderInterface.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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\Authentication\Provider;
  11. use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
  12. use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
  13. /**
  14. * AuthenticationProviderInterface is the interface for all authentication
  15. * providers.
  16. *
  17. * Concrete implementations processes specific Token instances.
  18. *
  19. * @author Fabien Potencier <fabien@symfony.com>
  20. */
  21. interface AuthenticationProviderInterface extends AuthenticationManagerInterface
  22. {
  23. /**
  24. * Use this constant for not provided username.
  25. *
  26. * @var string
  27. */
  28. public const USERNAME_NONE_PROVIDED = 'NONE_PROVIDED';
  29. /**
  30. * Checks whether this provider supports the given token.
  31. *
  32. * @return bool true if the implementation supports the Token, false otherwise
  33. */
  34. public function supports(TokenInterface $token);
  35. }