getUser() == config('auth.HTTP_BASIC_USERNAME') && $request->getPassword() == config('auth.HTTP_BASIC_PASSWORD')) { return $next($request); } return response('Invalid credentials.', Response::HTTP_UNAUTHORIZED, ['WWW-Authenticate' => 'Basic']); } }