Table of Contents

Interface ICapabilityGrantRequestBindingProvider

Namespace
AsiBackbone.AspNetCore.CapabilityGrants
Assembly
AsiBackbone.AspNetCore.dll

Defines what a capability grant's ResourceBinding covers for the current request.

public interface ICapabilityGrantRequestBindingProvider

Remarks

The provider turns the parts of a request that a grant authorizes, such as form fields, a JSON body, or route values, into a binding value. SignedCapabilityGrantEndpointValidator requires the grant's resource binding to equal that value exactly, so the issuer must compute the binding with the same rules when it issues the grant.

A provider that cannot bind the request returns Unavailable(string), which denies the request. Returning None states that the request has no bound resource; the validator then accepts only grants that carry no resource binding.

Methods

ResolveAsync(HttpContext, EndpointGovernanceDescriptor, CancellationToken)

Resolves the resource binding expected for the current request.

ValueTask<CapabilityGrantRequestBinding> ResolveAsync(HttpContext httpContext, EndpointGovernanceDescriptor descriptor, CancellationToken cancellationToken = default)

Parameters

httpContext HttpContext

The current HTTP context.

descriptor EndpointGovernanceDescriptor

The endpoint governance descriptor.

cancellationToken CancellationToken

A token that can cancel binding resolution.

Returns

ValueTask<CapabilityGrantRequestBinding>

The resolved binding.