feat(api): ForbiddenProblemDetailsHandler 403 shape [UDT-006]

This commit is contained in:
2026-04-15 16:27:36 -03:00
parent 58d0df601f
commit 4866c4f21f
2 changed files with 59 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ builder.Services.AddInfrastructure(builder.Configuration);
// Authorization — handler lives in Api layer; DO NOT move to Infrastructure DI
builder.Services.AddAuthorization();
builder.Services.AddScoped<IAuthorizationHandler, PermissionAuthorizationHandler>();
builder.Services.AddSingleton<IAuthorizationMiddlewareResultHandler, ForbiddenProblemDetailsHandler>();
// Controllers with exception filter
builder.Services.AddControllers(opts =>