/** * Create a new remember token for the user if one doesn't already exist. * * @param \Illuminate\Contracts\Auth\User $user * @return void */ protected function createRememberTokenIfDoesntExist(UserContract $user) { $rememberToken = $user->getRememberToken(); if (empty($rememberToken)) { $this->refreshRememberToken($user); } }
/** * Validate a user against the given credentials. * * @param \Illuminate\Contracts\Auth\User $user * @param array $credentials * @return bool */ public function validateCredentials(UserContract $user, array $credentials) { $plain = $credentials['password']; return $this->hasher->check($plain, $user->getAuthPassword()); }