Table of Contents

Class AsiBackboneSignedCapabilityGrantServiceCollectionExtensions

Namespace
AsiBackbone.AspNetCore.DependencyInjection
Assembly
AsiBackbone.AspNetCore.dll

Provides opt-in registration for signed capability grant endpoint validation.

public static class AsiBackboneSignedCapabilityGrantServiceCollectionExtensions
Inheritance
AsiBackboneSignedCapabilityGrantServiceCollectionExtensions
Inherited Members

Remarks

Nothing here is registered by AddAsiBackboneAspNetCore(IServiceCollection). Hosts that keep a claim-backed IEndpointCapabilityGrantValidator see no change.

Methods

AddAsiBackboneFormFieldCapabilityGrantBinding(IServiceCollection, Action<FormFieldCapabilityGrantBindingOptions>?)

Registers FormFieldCapabilityGrantRequestBindingProvider as the capability grant request-binding provider.

public static IServiceCollection AddAsiBackboneFormFieldCapabilityGrantBinding(this IServiceCollection services, Action<FormFieldCapabilityGrantBindingOptions>? configure = null)

Parameters

services IServiceCollection

The service collection to add services to.

configure Action<FormFieldCapabilityGrantBindingOptions>

An optional callback that configures the excluded field names.

Returns

IServiceCollection

The same service collection so calls can be chained.

Exceptions

ArgumentNullException

services is null.

AddAsiBackboneSignedCapabilityGrants(IServiceCollection, Action<SignedCapabilityGrantOptions>)

Registers SignedCapabilityGrantEndpointValidator as the endpoint capability grant validator.

public static IServiceCollection AddAsiBackboneSignedCapabilityGrants(this IServiceCollection services, Action<SignedCapabilityGrantOptions> configure)

Parameters

services IServiceCollection

The service collection to add services to.

configure Action<SignedCapabilityGrantOptions>

The options configuration callback, which must set the issuer and audience.

Returns

IServiceCollection

The same service collection so calls can be chained.

Remarks

The host must also register an IGovernanceSignatureVerificationService, an ICapabilityGrantUseStore, and an ICapabilityGrantRequestBindingProvider, for example with AddAsiBackboneFormFieldCapabilityGrantBinding(IServiceCollection, Action<FormFieldCapabilityGrantBindingOptions>?). Any of them missing denies every request that requires a capability grant.

Option validation runs through the Microsoft.Extensions.Options pipeline and at host startup.

Exceptions

ArgumentNullException

services or configure is null.

InvalidOperationException

Another IEndpointCapabilityGrantValidator is already registered.