use(BasicAuth::basicAuth("user:password")); $app->get("/", function ($context) { return $context->html("

Welcome to the protected area!

"); }); $app->run();