From affolternet-web-bff
Configure affolterNET.Web.Bff service registration and middleware pipeline. Use when setting up AddBffServices, ConfigureBffApp, or configuring the BFF middleware order.
How this skill is triggered — by the user, by Claude, or both
Slash command
/affolternet-web-bff:bff-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configure the affolterNET.Web.Bff service registration and middleware pipeline.
Configure the affolterNET.Web.Bff service registration and middleware pipeline.
For complete reference, see Library Guide.
// Program.cs
var builder = WebApplication.CreateBuilder(args);
// Step 1: Register services
var options = builder.Services.AddBffServices(
builder.Environment.IsDevelopment(),
builder.Configuration,
opts => {
opts.EnableSecurityHeaders = true;
opts.ConfigureBff = bff => {
bff.AuthMode = AuthenticationMode.Authorize;
bff.EnableSessionManagement = true;
};
});
var app = builder.Build();
// Step 2: Configure middleware
app.ConfigureBffApp(options);
app.Run();
| Property | Type | Description |
|---|---|---|
EnableSecurityHeaders | bool | Enable security headers middleware |
ConfigureBff | Action | Configure BFF-specific options |
ConfigureAfterRoutingCustomMiddleware | Action | Add custom middleware after routing |
ConfigureBeforeEndpointsCustomMiddleware | Action | Add custom middleware before endpoints |
| Property | Type | Default | Description |
|---|---|---|---|
AuthMode | AuthenticationMode | None | Authentication mode |
EnableSessionManagement | bool | false | Enable session management |
The ConfigureBffApp configures middleware in this order:
var options = builder.Services.AddBffServices(
builder.Environment.IsDevelopment(), // isDev flag
builder.Configuration,
opts => {
// Development-specific config happens automatically
});
var options = builder.Services.AddBffServices(isDev, config, opts => {
opts.ConfigureAfterRoutingCustomMiddleware = app => {
app.UseMiddleware<TenantMiddleware>();
};
opts.ConfigureBeforeEndpointsCustomMiddleware = app => {
app.UseMiddleware<AuditMiddleware>();
};
});
var options = builder.Services.AddBffServices(isDev, config, opts => {
opts.ConfigureBff = bff => {
bff.EnableSessionManagement = true;
};
});
npx claudepluginhub affolternet/affolternet.web --plugin affolternet-web-bffCustom middleware patterns for ASP.NET Core applications. Covers request/response pipeline, middleware ordering, conditional middleware, IMiddleware factory pattern, IExceptionHandler (.NET 8+), and reusable middleware components. Use when creating custom middleware in ASP.NET Core applications, understanding middleware pipeline ordering, or implementing cross-cutting concerns like logging, authentication, and caching.
Routes, aggregates, and secures client requests through an API gateway or BFF pattern using Express with auth, rate limiting, and service proxies.
Secures ASP.NET Core Web API endpoints with JWT Bearer token validation and Auth0 integration. Handles DPoP proof-of-possession binding.