/** * Check the given plain value against a hash. * * @param string $value * @param string $hashedValue * @param array $options * @return bool */ public function check($value, $hashedValue, array $options = array()) { return PHPass::make()->check('hasher', $value, NULL, $hashedValue); }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { // Collect user data $password = $credentials['password']; $salt = $this->user->salt; $hash = $user->getAuthPassword(); // Check if user is banned if (!$this->user->active) { App::abort(403); // Forbidden } return PHPass::make()->check('User', $password, $salt, $hash); }