Host startup¶
BolRazorLayoutStartup is the base class a consumer application inherits for its startup. It builds on OidcRazorStartup from the platform packages and adds the BOL specific configuration.
| Field | Value |
|---|---|
| Operation ID | OP-02 |
| Trigger | Consumer startup inheriting BolRazorLayoutStartup |
| Inputs | IConfiguration, the BasicAppMap configuration section |
| Outputs | Registered BOL services and bound IOptions<BasicAppMap> |
| Primary components | BolRazorLayoutStartup.ConfigureServices, BolRazorLayoutStartup.Configure |
| Entry point | src/BolMiddleware/BolRazorLayoutStartup.cs |
Steps¶
- The constructor stores the supplied
IConfigurationand calls the base constructor. ConfigureServicessetsEnableLegacyBolAuthMiddlewareto true so the base startup adds the legacy BOL authentication middleware.- It calls the base
ConfigureServicesto register OIDC authentication and platform services. - It calls Register BOL services.
- It binds the
BasicAppMapconfiguration section toIOptions<BasicAppMap>and registers a scopedIAppMapthat resolves a defaultBasicAppMapinstance. Configureonly calls the base implementation; the resulting middleware order is unknown**.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Startup]) --> S1[Enable legacy BOL auth middleware]
S1 --> S2[Base ConfigureServices]
S2 --> S3[Register BOL services]
S3 --> S4[Bind BasicAppMap options]
S4 --> S5[Register scoped IAppMap]
S5 --> EndOk([Configure calls base])
Failure and edge-case behavior¶
IAppMapresolves an unbound defaultBasicAppMap, while views read the boundIOptions<BasicAppMap>; code that injectsIAppMapsees empty values.BolLayoutStartup.csis entirely commented out; it is dead code and has no effect.
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Configuration
- Operations and processes
- Business rules
- Security and authorization
- Service registration
- API reference
Sources¶
- src/BolMiddleware/BolRazorLayoutStartup.cs
- src/BolMiddleware/BolLayoutStartup.cs
- src/BolMiddleware/Models/MenuModels/BasicAppMap.cs