Table of Contents

Class ApiKeySentinelFilter

Namespace
Cuemon.AspNetCore.Mvc.Filters.Headers
Assembly
Cuemon.AspNetCore.Mvc.dll

A filter that confirms request authorization in the form of an API key sentinel.

public class ApiKeySentinelFilter : ConfigurableAsyncAuthorizationFilter<ApiKeySentinelOptions>, IConfigurable<ApiKeySentinelOptions>, IAsyncAuthorizationFilter, IFilterMetadata
Inheritance
ApiKeySentinelFilter
Implements
IAsyncAuthorizationFilter
IFilterMetadata
Inherited Members

Constructors

ApiKeySentinelFilter(IOptions<ApiKeySentinelOptions>)

Initializes a new instance of the ApiKeySentinelFilter class.

public ApiKeySentinelFilter(IOptions<ApiKeySentinelOptions> setup)

Parameters

setup IOptions<ApiKeySentinelOptions>

The ApiKeySentinelOptions which need to be configured.

Methods

OnAuthorizationAsync(AuthorizationFilterContext)

Called early in the filter pipeline to confirm request is authorized.

public override async Task OnAuthorizationAsync(AuthorizationFilterContext context)

Parameters

context AuthorizationFilterContext

The Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext.

Returns

Task

A Task that on completion indicates the filter has executed.

See Also