AuthenticationTrustResolverInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. /**
  13. * Interface for resolving the authentication status of a given token.
  14. *
  15. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  16. */
  17. interface AuthenticationTrustResolverInterface
  18. {
  19. /**
  20. * Resolves whether the passed token implementation is authenticated
  21. * anonymously.
  22. *
  23. * If null is passed, the method must return false.
  24. *
  25. * @return bool
  26. */
  27. public function isAnonymous(TokenInterface $token = null);
  28. /**
  29. * Resolves whether the passed token implementation is authenticated
  30. * using remember-me capabilities.
  31. *
  32. * @return bool
  33. */
  34. public function isRememberMe(TokenInterface $token = null);
  35. /**
  36. * Resolves whether the passed token implementation is fully authenticated.
  37. *
  38. * @return bool
  39. */
  40. public function isFullFledged(TokenInterface $token = null);
  41. }