JeremyKendall\Password\PasswordValidatorInterface::isValid PHP Method

isValid() public method

Validates password and rehashes if necessary.
public isValid ( string $password, string $passwordHash, string $legacySalt = null, string $identity = null ) : JeremyKendall\Password\Result
$password string Password provided by user during login
$passwordHash string User's current hashed password
$legacySalt string OPTIONAL salt used in legacy password hashing
$identity string OPTIONAL unique user identifier
return JeremyKendall\Password\Result
    public function isValid($password, $passwordHash, $legacySalt = null, $identity = null);

Usage Example

コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function isValid($password, $passwordHash, $legacySalt = null, $identity = null)
 {
     return $this->validator->isValid($password, $passwordHash, $legacySalt, $identity);
 }