SHARE
TWEET

UserPasswordEncoderInterface

a guest Feb 14th, 2020 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /*
  4.  * This file is part of the Symfony package.
  5.  *
  6.  * (c) Fabien Potencier <fabien@symfony.com>
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11.  
  12. namespace Symfony\Component\Security\Core\Encoder;
  13.  
  14. use Symfony\Component\Security\Core\User\UserInterface;
  15.  
  16. /**
  17.  * UserPasswordEncoderInterface is the interface for the password encoder service.
  18.  *
  19.  * @author Ariel Ferrandini <arielferrandini@gmail.com>
  20.  */
  21. interface UserPasswordEncoderInterface
  22. {
  23.     /**
  24.      * Encodes the plain password.
  25.      *
  26.      * @param UserInterface $user          The user
  27.      * @param string        $plainPassword The password to encode
  28.      *
  29.      * @return string The encoded password
  30.      */
  31.     public function encodePassword(UserInterface $user, $plainPassword);
  32.  
  33.    
  34.  
  35.     /**
  36.      * @param UserInterface $user The user
  37.      * @param string        $raw  A raw password
  38.      *
  39.      * @return bool true if the password is valid, false otherwise
  40.      */
  41.     public function isPasswordValid(UserInterface $user, $raw);
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top