RememberMeBadge.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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\Authenticator\Passport\Badge;
  11. /**
  12. * Adds support for remember me to this authenticator.
  13. *
  14. * Remember me cookie will be set if *all* of the following are met:
  15. * A) This badge is present in the Passport
  16. * B) The remember_me key under your firewall is configured
  17. * C) The "remember me" functionality is activated. This is usually
  18. * done by having a _remember_me checkbox in your form, but
  19. * can be configured by the "always_remember_me" and "remember_me_parameter"
  20. * parameters under the "remember_me" firewall key
  21. * D) The authentication process returns a success Response object
  22. *
  23. * @author Wouter de Jong <wouter@wouterj.nl>
  24. *
  25. * @final
  26. * @experimental in 5.2
  27. */
  28. class RememberMeBadge implements BadgeInterface
  29. {
  30. public function isResolved(): bool
  31. {
  32. return true; // remember me does not need to be explicitly resolved
  33. }
  34. }