Table of Contents

Class SignedCapabilityGrantOptions

Namespace
AsiBackbone.AspNetCore.CapabilityGrants
Assembly
AsiBackbone.AspNetCore.dll
public sealed class SignedCapabilityGrantOptions
Inheritance
SignedCapabilityGrantOptions
Inherited Members

Remarks

The host owns every value here. Issuer and Audience are required; the validator binds the actor, operation, scopes, and policy context itself from the request, the endpoint descriptor, and the current decision.

Fields

DefaultTokenHeaderName

Gets the default request header that carries the capability grant token.

public const string DefaultTokenHeaderName = "AsiBackbone-Capability-Grant"

Field Value

string

Properties

AllowedClockSkew

Gets or sets the non-negative tolerance applied to a grant's not-before and expiry times.

public TimeSpan AllowedClockSkew { get; set; }

Property Value

TimeSpan

Remarks

Defaults to zero. Hosts whose issuer and relying party run on different machines usually allow a few seconds.

Audience

Gets or sets the audience every accepted grant must name, typically this relying party.

public string? Audience { get; set; }

Property Value

string

BindPolicy

Gets or sets a value indicating whether the grant must carry the policy version and hash of the current decision, when the decision has them.

public bool BindPolicy { get; set; }

Property Value

bool

ExpectedProofKeyId

Gets or sets the signing key identifier the grant proof must use, when set.

public string? ExpectedProofKeyId { get; set; }

Property Value

string

ExpectedProofKeyVersion

Gets or sets the signing key version the grant proof must use, when set.

public string? ExpectedProofKeyVersion { get; set; }

Property Value

string

Issuer

Gets or sets the issuer every accepted grant must name.

public string? Issuer { get; set; }

Property Value

string

MaxTokenLength

Gets or sets the maximum accepted token length, in characters.

public int MaxTokenLength { get; set; }

Property Value

int

MaxUseCount

Gets or sets the local use limit. The narrower of this value and the grant's signed MaxUseCount applies.

public int MaxUseCount { get; set; }

Property Value

int

ProofPayloadOptions

Gets or sets the canonical payload options the issuer signed with; defaults apply when null.

public CanonicalPayloadOptions? ProofPayloadOptions { get; set; }

Property Value

CanonicalPayloadOptions

RequiredProofHashAlgorithm

Gets or sets the hash algorithm the grant proof must use, when set.

public string? RequiredProofHashAlgorithm { get; set; }

Property Value

string

RequiredProofProvider

Gets or sets the signing provider that must have produced the grant proof, when set.

public string? RequiredProofProvider { get; set; }

Property Value

string

TokenFormFieldName

Gets or sets the form field that carries the token, or null to not read the form.

public string? TokenFormFieldName { get; set; }

Property Value

string

Remarks

The header is read first. FormFieldCapabilityGrantRequestBindingProvider always excludes this field from the form binding, because the token cannot bind itself.

TokenHeaderName

Gets or sets the request header that carries the token, or null to not read a header.

public string? TokenHeaderName { get; set; }

Property Value

string

Methods

Validate()

Validates the configured options.

public void Validate()

Exceptions

InvalidOperationException

An option is missing or out of range.