Skip to content

Latest commit

 

History

History
94 lines (77 loc) · 3.83 KB

File metadata and controls

94 lines (77 loc) · 3.83 KB

Atc.Rest.Extended.Options


ConfigureApiVersioningOptions

Configures API versioning options for ASP.NET Core API versioning. Sets up version readers for header, media type, query string, and URL segment versioning.

public class ConfigureApiVersioningOptions : IConfigureOptions<ApiVersioningOptions>

Methods

Configure

void Configure(ApiVersioningOptions options)

Summary: Configures the API versioning options with multiple version reading strategies.

Parameters:
     options  -  The to configure.


ConfigureAuthorizationOptions

Post-configures JWT Bearer authentication and authorization options based on Atc.Rest.Extended.Options.RestApiExtendedOptions. Signing-key discovery is delegated to JwtBearer's built-in Microsoft.IdentityModel.Protocols.ConfigurationManager1, which fetches and caches the OIDC discovery document on the first authentication request using the Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions.Authority` set here.

public class ConfigureAuthorizationOptions : IPostConfigureOptions<JwtBearerOptions>, IPostConfigureOptions<AuthenticationOptions>

Methods

PostConfigure

void PostConfigure(string name, JwtBearerOptions options)

Summary: Post-configures JWT Bearer options with token validation parameters. Signing keys are not pre-fetched; JwtBearer's built-in Microsoft.IdentityModel.Protocols.ConfigurationManager1` discovers and caches them from the OIDC discovery endpoint on the first authentication request.

Parameters:
     name  -  The name of the options instance being configured.
     options  -  The to configure.

PostConfigure

void PostConfigure(string name, AuthenticationOptions options)

Summary: Post-configures JWT Bearer options with token validation parameters. Signing keys are not pre-fetched; JwtBearer's built-in Microsoft.IdentityModel.Protocols.ConfigurationManager1` discovers and caches them from the OIDC discovery endpoint on the first authentication request.

Parameters:
     name  -  The name of the options instance being configured.
     options  -  The to configure.


RestApiExtendedOptions

Extended options for configuring REST API features including API versioning, OpenAPI/Swagger, and FluentValidation. Extends Atc.Rest.Options.RestApiOptions with additional configuration for extended features.

public class RestApiExtendedOptions : RestApiOptions

Properties

SwaggerUiTheme

SwaggerUiTheme

Summary: Gets or sets the Swagger UI theme to use. Can be "Light", "Dark", or a custom CSS file path. Default is "Dark".

UseApiVersioning

UseApiVersioning

Summary: Gets or sets a value indicating whether API versioning should be enabled. Default is true.

UseFluentValidation

UseFluentValidation

Summary: Gets or sets a value indicating whether FluentValidation should be enabled. Default is true.

UseOpenApiSpec

UseOpenApiSpec

Summary: Gets or sets a value indicating whether OpenAPI specification generation should be enabled. Default is true.

UseSwaggerUi

UseSwaggerUi

Summary: Gets or sets a value indicating whether Swagger UI should be enabled. Default is false.


Generated by MarkdownCodeDoc version 1.2