Class BasicAuthenticationMiddleware
Provides a HTTP Basic Authentication middleware implementation for ASP.NET Core.
Inheritance
System.Object
BasicAuthenticationMiddleware
Implements
Inherited Members
Namespace: Cuemon.AspNetCore.Authentication
Assembly: Cuemon.AspNetCore.Authentication.dll
Syntax
public class BasicAuthenticationMiddleware : ConfigurableMiddleware<BasicAuthenticationOptions>, IConfigurable<BasicAuthenticationOptions>
Constructors
| Improve this DocBasicAuthenticationMiddleware(RequestDelegate, IOptions<BasicAuthenticationOptions>)
Initializes a new instance of the BasicAuthenticationMiddleware class.
Declaration
public BasicAuthenticationMiddleware(RequestDelegate next, IOptions<BasicAuthenticationOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
Microsoft.Extensions.Options.IOptions<BasicAuthenticationOptions> | setup | The BasicAuthenticationOptions which need to be configured. |
BasicAuthenticationMiddleware(RequestDelegate, Action<BasicAuthenticationOptions>)
Initializes a new instance of the BasicAuthenticationMiddleware class.
Declaration
public BasicAuthenticationMiddleware(RequestDelegate next, Action<BasicAuthenticationOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
System.Action<BasicAuthenticationOptions> | setup | The middleware BasicAuthenticationOptions which need to be configured. |
Properties
| Improve this DocAuthenticationScheme
Gets the name of the authentication scheme.
Declaration
public string AuthenticationScheme { get; }
Property Value
Type | Description |
---|---|
System.String | The name of the authentication scheme. |
Methods
| Improve this DocInvokeAsync(HttpContext)
Executes the BasicAuthenticationMiddleware.
Declaration
public override Task InvokeAsync(HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpContext | context | The context of the current request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the execution of this middleware. |
Overrides
Cuemon.AspNetCore.ConfigurableMiddleware<Cuemon.AspNetCore.Authentication.BasicAuthenticationOptions>.InvokeAsync(Microsoft.AspNetCore.Http.HttpContext)