Class BasicAuthenticationMiddleware
Provides basic authentication via back-office credentials for public website access if configured for use and the client IP is not allow listed.
Inheritance
object
Namespace: Umbraco.Cms.Web.Common.Middleware
Assembly: Umbraco.Web.Website.dll
Syntax
public class BasicAuthenticationMiddleware
Constructors
View SourceBasicAuthenticationMiddleware(IRuntimeState, IBasicAuthService, IHostingEnvironment)
Initializes a new instance of the BasicAuthenticationMiddleware class.
Declaration
public BasicAuthenticationMiddleware(IRuntimeState runtimeState, IBasicAuthService basicAuthService, IHostingEnvironment hostingEnvironment)
Parameters
| Type | Name | Description |
|---|---|---|
| IRuntimeState | runtimeState | The runtime state used to determine if the application is running. |
| IBasicAuthService | basicAuthService | The service providing basic authentication configuration and validation. |
| IHostingEnvironment | hostingEnvironment | The hosting environment used to resolve the backoffice path. |
Methods
View SourceInvokeAsync(HttpContext, RequestDelegate)
Declaration
public Task InvokeAsync(HttpContext context, RequestDelegate next)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | |
| RequestDelegate | next |
Returns
| Type | Description |
|---|---|
| Task |