AuthenticationManagerInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  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. * @param TokenInterface $token The TokenInterface instance to authenticate
  25. *
  26. * @return TokenInterface An authenticated TokenInterface instance, never null
  27. *
  28. * @throws AuthenticationException if the authentication fails
  29. */
  30. public function authenticate(TokenInterface $token);
  31. }