Class ControllerConfiguration
- Namespace
- OpenSettings.Configurations
- Assembly
- OpenSettings.dll
Configuration options for the settings controller, including route, authorization and Api visibility.
public class ControllerConfiguration
- Inheritance
-
ControllerConfiguration
- Inherited Members
Constructors
ControllerConfiguration()
Initializes a new instance of the ControllerConfiguration class.
public ControllerConfiguration()
Properties
AllowFromExploring
Specifies whether the open settings controller's endpoints should be exposed in Api documentation (e.g., for Swagger or other Api explorers).
public bool AllowFromExploring { get; set; }
Property Value
Remarks
The default value is 'false'.
OpenIdConnect
Gets or sets OpenIdConnect configuration for the open settings controller, allowing for more detailed configuration of authentication and authorization using OpenIdConnect.
public OpenIdConnectConfiguration OpenIdConnect { get; set; }
Property Value
RequiresAuthentication
Indicates whether the controller requires authentication for access.
When set to true, authentication is enforced.
When set to false, the controller is accessible without authentication unless the service type is Consumer, in which case the provider's authorization settings take precedence, and authentication may still be required.
The default value is 'false'.
public bool RequiresAuthentication { get; set; }
Property Value
Remarks
Middleware should be registered in the following order to ensure authentication works:
app.UseRouting();
app.UseOpenSettings();
app.UseAuthentication();
app.UseAuthorization();
app.MapControllers();
For more information, see Asp.Net Core Middleware Order
Route
Gets or sets the base route for the service controller's endpoints.
Default is "api/settings". Trailing and leading slashes are trimmed if present.
public string Route { get; set; }