Пример #1
0
 /**
  *
  * Verifies the password.
  *
  * @param array $input The user input array.
  *
  * @param array $data The data from the database.
  *
  * @return bool
  *
  * @throws Exception\PasswordIncorrect
  *
  */
 protected function verify($input, $data)
 {
     $verified = $this->verifier->verify($input['password'], $data['password'], $data);
     if (!$verified) {
         throw new Exception\PasswordIncorrect();
     }
     return true;
 }
Пример #2
0
 /**
  *
  * Verifies the input password against the hashed password.
  *
  * @param string $password The input password.
  *
  * @param string $hashvalue The hashed password in htpasswd.
  *
  * @return null
  *
  * @throws Exception\PasswordIncorrect on failed verification.
  *
  */
 protected function verify($password, $hashvalue)
 {
     if (!$this->verifier->verify($password, $hashvalue)) {
         throw new Exception\PasswordIncorrect();
     }
 }