vendor/symfony/security-core/Encoder/UserPasswordEncoderInterface.php line 17

Open in your IDE?
  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\Encoder;
  11. use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
  12. use Symfony\Component\Security\Core\User\UserInterface;
  13. trigger_deprecation('symfony/security-core', '5.3', 'The "%s" interface is deprecated, use "%s" instead.', UserPasswordEncoderInterface::class, UserPasswordHasherInterface::class);
  14. /**
  15. * UserPasswordEncoderInterface is the interface for the password encoder service.
  16. *
  17. * @author Ariel Ferrandini <arielferrandini@gmail.com>
  18. *
  19. * @deprecated since Symfony 5.3, use {@link UserPasswordHasherInterface} instead
  20. */
  21. interface UserPasswordEncoderInterface
  22. {
  23. /**
  24. * Encodes the plain password.
  25. *
  26. * @return string
  27. */
  28. public function encodePassword(UserInterface $user, string $plainPassword);
  29. /**
  30. * @return bool
  31. */
  32. public function isPasswordValid(UserInterface $user, string $raw);
  33. /**
  34. * Checks if an encoded password would benefit from rehashing.
  35. */
  36. public function needsRehash(UserInterface $user): bool;
  37. }