AuthenticationManagerInterface.php 960 B

123456789101112131415161718192021222324252627282930313233
  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;
  11. use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
  12. use Symfony\Component\Security\Core\Exception\AuthenticationException;
  13. /**
  14. * AuthenticationManagerInterface is the interface for authentication managers,
  15. * which process Token authentication.
  16. *
  17. * @author Fabien Potencier <fabien@symfony.com>
  18. */
  19. interface AuthenticationManagerInterface
  20. {
  21. /**
  22. * Attempts to authenticate a TokenInterface object.
  23. *
  24. * @return TokenInterface An authenticated TokenInterface instance, never null
  25. *
  26. * @throws AuthenticationException if the authentication fails
  27. */
  28. public function authenticate(TokenInterface $token);
  29. }