This class loads the defined encoder and uses it to create a hash from the submitted password and verifies if it
matches the password from the user provider.
/** * Verify if the $password matches the $hash. * * @param string $password * @param string $hash * * @return bool True if $password matches $hash. Otherwise false is returned. */ public function verifyPasswordHash($password, $hash) { return $this->encoder->verifyPasswordHash($password, $hash); }
public function testVerifyPasswordHashFalse() { $encoder = new Encoder('\\Webiny\\Component\\Security\\Tests\\Mocks\\EncoderMock'); $this->assertFalse($encoder->verifyPasswordHash('admin', 'password')); }