NoopAuthenticationManager.php 991 B

12345678910111213141516171819202122232425262728293031323334
  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\Http\Authentication;
  11. use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
  12. use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
  13. /**
  14. * This class is used when the authenticator system is activated.
  15. *
  16. * This is used to not break AuthenticationChecker and ContextListener when
  17. * using the authenticator system. Once the authenticator system is no longer
  18. * experimental, this class can be used to trigger deprecation notices.
  19. *
  20. * @internal
  21. *
  22. * @author Wouter de Jong <wouter@wouterj.nl>
  23. */
  24. class NoopAuthenticationManager implements AuthenticationManagerInterface
  25. {
  26. public function authenticate(TokenInterface $token)
  27. {
  28. return $token;
  29. }
  30. }