/** * @inheritdoc */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials[Loader::password()]; if (Hash::check($plain, $user->getAuthPassword())) { return true; } if ($this->delegator->provider($credentials)->authenticate()) { return true; } return null; }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['password']; // Is user password valid? if (!$this->hasher->check($plain, $user->getAuthPassword())) { throw new \Exception('User password is incorrect'); } // Is the user deleted? if ($user->deleted_at !== NULL) { throw new \Exception('User is deleted'); } return true; }
/** * 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); }
/** * Validate a user against the given credentials. */ public function validateCredentials(UserInterface $user, array $credentials) { // If password equals than the user is ok to signin. return $user->getAuthPassword() == $credentials["password"]; }
/** * Validate a user against the given credentials. * * @param Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['password']; // Is user password is valid? if (!$this->hasher->check($user->salt . $plain, $user->getAuthPassword())) { throw new UserPasswordIncorrectException('User password is incorrect'); } // Valid user, but are they verified? if (!$user->verified) { throw new UserUnverifiedException('User is not verified'); } // Is the user disabled? if ($user->disabled) { throw new UserDisabledException('User is disabled'); } // Is the user deleted? if ($user->deleted_at !== NULL) { throw new UserDeletedException('User is deleted'); } return true; }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { return $user->getAuthPassword() === $credentials['password']; }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @throws \ErrorException * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { if (!array_key_exists('password', $credentials) || !$credentials['password']) { throw new ErrorException('Missing credential: "password"'); } return str_is($credentials['password'], $user->getAuthPassword()); }
/** * Set or refresh our cookies. * * @param \Illuminate\Auth\UserInterface $user * @param bool $remember * @return void */ protected function setLoginCookie(UserInterface $user, $remember = false) { $username = $user->getUsername(); $password = $user->getAuthPassword(); $this->etSession->login($username, $password, $remember); }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { return $this->hasher->checkhash($credentials['password'], $user->getAuthPassword()); }
/** * Validate a user against the given credentials. * * @param Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['password']; // Is user password is valid? if (!$this->hasher->check($user->salt . $plain, $user->getAuthPassword())) { throw new UserPasswordIncorrectException($this->getName() . ' password is incorrect'); } // Valid user, but are they verified? if (!$user->verified) { throw new UserUnverifiedException($this->getName() . ' is unverified'); } // Is the user disabled? if ($user->disabled) { throw new UserDisabledException($this->getName() . ' is disabled'); } // Is the user deleted? if ($user->deleted_at !== NULL) { throw new UserDeletedException($this->getName() . ' is deleted'); } $user->last_ip = \Sanitize::clean(\Request::getClientIp()); $user->last_login = date(SQL_DATETIME); $user->save(); return true; }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['clave']; if ($plain == $user->getAuthPassword()) { return true; } return false; //$plain.' - '.$user->getAuthPassword(); //return $this->hasher->check($plain, $user->getAuthPassword()); }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $hash = sha1($credentials['password']); return $hash == $user->getAuthPassword(); }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['password']; if ($this->encryptedPassword) { return $plain == $this->encrypter->decrypt($user->getAuthPassword()); } return $this->hasher->check($plain, $user->getAuthPassword()); }
/** * Validate a user against the given credentials. * * @TODO Get rid of hardcoded password attribute * @TODO Credentials check has been changed for backward compatibility. Fix this * * @param Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['Password']; $salt = $user->PasswordSalt; $hash = crypt(sha1($plain), $salt); return $user->getAuthPassword() == $hash; }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['password']; return $this->hasher->CheckPassword($plain, $user->getAuthPassword()); }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['password']; $authPassword = $user->getAuthPassword(); return $authPassword === md5($plain); // return $this->hasher->check($plain, $user->getAuthPassword()); }
/** * Set or refresh our cookies. * * @param \Illuminate\Auth\UserInterface $user * @param bool $remember * @return void */ protected function setLoginCookie(UserInterface $user, $remember = false) { $id = $user->getAuthIdentifier(); $password = $user->getAuthPassword(); $cookie = $this->storage->login($id, $password, $remember); $this->queueCookie($cookie); }
/** * Validate a user against the given credentials. * * @param Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(Auth\UserInterface $user, array $credentials) { return Hash::check($credentials['password'], $user->getAuthPassword()); }
/** * Validate a user against the given credentials. * * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ public function validateCredentials(UserInterface $user, array $credentials) { $rawPassword = $credentials['password']; $authPassword = $user->getAuthPassword(); return $authPassword === md5($rawPassword); }