AuthenticationManagerInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Symfony\Component\Security\Authentication;
  3. use Symfony\Component\Security\Authentication\Token\TokenInterface;
  4. use Symfony\Component\Security\Exception\AuthenticationException;
  5. /*
  6. * This file is part of the Symfony package.
  7. *
  8. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  9. *
  10. * For the full copyright and license information, please view the LICENSE
  11. * file that was distributed with this source code.
  12. */
  13. /**
  14. * AuthenticationManagerInterface is the interface for authentication managers,
  15. * which process Token authentication.
  16. *
  17. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  18. */
  19. interface AuthenticationManagerInterface
  20. {
  21. /**
  22. * Attempts to authenticates a TokenInterface object.
  23. *
  24. * @param TokenInterface $token The TokenInterface instance to authenticate
  25. *
  26. * @return TokenInterface An authenticated TokenInterface instance
  27. *
  28. * @throws AuthenticationException if the authentication fails
  29. */
  30. function authenticate(TokenInterface $token);
  31. }