/** * Get the user for the given credentials. * * @param array $credentials * @return \Nova\Auth\Reminders\RemindableInterface * * @throws \UnexpectedValueException */ public function getUser(array $credentials) { $credentials = array_except($credentials, array('token')); $user = $this->users->retrieveByCredentials($credentials); if ($user && !$user instanceof RemindableInterface) { throw new \UnexpectedValueException("User must implement Remindable interface."); } return $user; }
/** * Refresh the remember token for the user. * * @param \Auth\UserInterface $user * @return void */ protected function refreshRememberToken(UserInterface $user) { $user->setRememberToken($token = str_random(60)); $this->provider->updateRememberToken($user, $token); }