Configure affolterNET.Web.Bff service registration and middleware pipeline. Use when setting up AddBffServices, ConfigureBffApp, or configuring the BFF middleware order.
Configures affolterNET.Web.Bff service registration and middleware pipeline. Use when setting up AddBffServices, ConfigureBffApp, or configuring the BFF middleware order.
/plugin marketplace add Mcafee123/affolterNET.Web/plugin install affolternet-web-bff@affolternet-webThis skill inherits all available tools. When active, it can use any tool Claude has access to.
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<BffOptions> | Configure BFF-specific options |
ConfigureAfterRoutingCustomMiddleware | Action<IApplicationBuilder> | Add custom middleware after routing |
ConfigureBeforeEndpointsCustomMiddleware | Action<IApplicationBuilder> | 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;
};
});
Configure Static Application Security Testing (SAST) tools for automated vulnerability detection in application code. Use when setting up security scanning, implementing DevSecOps practices, or automating code vulnerability detection.