Add comments API support and tests
Some checks failed
Dotnet build and test / build (push) Has been cancelled
Dotnet build and test / log-the-inputs (push) Has been cancelled

This commit is contained in:
Paul Schneider 2026-08-10 22:27:52 +01:00
commit eebc83cf7e
No known key found for this signature in database
GPG key ID: 1E66C65EE2B46F1B
6 changed files with 236 additions and 18 deletions

View file

@ -33,15 +33,11 @@ public class TestUserStartupFilter : IStartupFilter
{
return app =>
{
// Replay the production pipeline first (this is what
// Program.Main + ConfigurePipeline set up, including
// UseAuthentication and UseAuthorization).
next(app);
// Then add our middleware on top. UseMiddleware<T> wires
// it through the same IMiddlewareActivator the framework
// uses, so the dependency on TestUserMiddleware is
// resolved from the request scope.
app.UseMiddleware<TestUserMiddleware>();
// Replay the production pipeline after the test middleware,
// so downstream auth and controllers can see the injected
// principal when no real login flow is used.
next(app);
};
}
}