diff --git a/src/content/docs/bff/fundamentals/blazor/index.md b/src/content/docs/bff/fundamentals/blazor/index.md index c0f94802..c62d950a 100644 --- a/src/content/docs/bff/fundamentals/blazor/index.md +++ b/src/content/docs/bff/fundamentals/blazor/index.md @@ -171,9 +171,6 @@ app.UseBff(); app.UseAuthorization(); app.UseAntiforgery(); -// 👋 Add BFF User Session Management endpoints -app.MapBffManagementEndpoints(); - app.MapRazorPages(); app.MapControllers() diff --git a/src/content/docs/bff/fundamentals/options.md b/src/content/docs/bff/fundamentals/options.md index 86099713..fa0a2c75 100644 --- a/src/content/docs/bff/fundamentals/options.md +++ b/src/content/docs/bff/fundamentals/options.md @@ -47,6 +47,7 @@ builder.Services.AddBff(options => * ***AutomaticallyRegisterBffMiddleware*** (added in 4.0) When applying BFF V4 multiple frontends, a lot of middlewares get automatically added to the pipeline. For example, the frontend selection middleware, the authentication handlers, etc. If you don't want this automatic behavior, then you can turn it off and register these middlewares manually. + * ***IndexHtmlClientName*** If BFF is configured to automatically retrieve the index.html, then it needs a http client to do so. With this name you can automatically configure http client in the http client factory. diff --git a/src/content/docs/bff/fundamentals/session/management/index.md b/src/content/docs/bff/fundamentals/session/management/index.md index 606df88a..187e4449 100644 --- a/src/content/docs/bff/fundamentals/session/management/index.md +++ b/src/content/docs/bff/fundamentals/session/management/index.md @@ -28,13 +28,37 @@ builder.Services.AddBff(options => }; ``` -The management endpoints need to be mapped: +Starting with BFF v4, the BFF automatically wires up the management endpoints. If you disable this behavior (using `AutomaticallyRegisterBffMiddleware`, this is how you can map the management endpoints: ```csharp // Program.cs -app.MapBffManagementEndpoints(); +var app = builder.Build(); + +// Preprocessing pipeline, which would have been automatically added to start of the request the pipeline. +app.UseBffPreProcessing(); + +// Your logic, such as: +app.UseRouting(); +app.UseBff(); + +// post processing pipeline that would have been automatically added to the end of the request pipeline. +app.UseBffPostProcessing(); + +app.Run(); +``` + +The *UsePreprocessing* method adds all handling for multiple frontend support. Alternatively, you can call these methods direct: +``` csharp +app.UseBffFrontendSelection(); +app.UseBffPathMapping(); +app.UseBffOpenIdCallbacks();~ ``` -*MapBffManagementEndpoints* adds all BFF management endpoints. You can also map each endpoint individually by calling the various *MapBffManagementXxxEndpoint* methods, for example *endpoints.MapBffManagementLoginEndpoint()*. + +`UseBffPostProcessing` adds all BFF management endpoints and handlers for proxying `index.html`. You can also map each endpoint individually by calling the various `MapBffManagementXxxEndpoint` methods, for example `endpoints.MapBffManagementLoginEndpoint()`. The following pages describe the default behavior of the management endpoints. See the [extensibility](/bff/extensibility) section for information about how to customize the behavior of the endpoints. + +:::note +In V3 and below, only the method `MapBffManagementEndpoints` exists. +::: \ No newline at end of file