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
httpContextHttpContextThe current HTTP context.
descriptorEndpointGovernanceDescriptorThe endpoint governance descriptor.
cancellationTokenCancellationTokenA token that can cancel binding resolution.
Returns
- ValueTask<CapabilityGrantRequestBinding>
The resolved binding.