Table of Contents

Class CapabilityScopeDeclarationConstraint

Namespace
ReferenceApplication.Web.Governance
Assembly
ReferenceApplication.Web.dll

Fails closed when a capability-protected policy marker is used without the corresponding endpoint capability scope.

public sealed class CapabilityScopeDeclarationConstraint : IGovernanceConstraint<GovernanceEvaluationContext>
Inheritance
CapabilityScopeDeclarationConstraint
Implements
IGovernanceConstraint<GovernanceEvaluationContext>
Inherited Members

Fields

ConstraintName

Gets the stable name of this constraint.

public const string ConstraintName = "referenceapplication.capability.declaration"

Field Value

string

DeniedReasonCode

Gets the machine-readable reason code returned when the required scope is absent.

public const string DeniedReasonCode = "referenceapplication.capability.scope_required"

Field Value

string

Properties

Name

Gets the stable name of the constraint.

public string Name { get; }

Property Value

string

Methods

EvaluateAsync(GovernanceEvaluationContext, CancellationToken)

Evaluates the constraint for the supplied context.

public ValueTask<ConstraintEvaluationResult> EvaluateAsync(GovernanceEvaluationContext context, CancellationToken cancellationToken = default)

Parameters

context GovernanceEvaluationContext

The context to evaluate.

cancellationToken CancellationToken

A token that can cancel asynchronous evaluation.

Returns

ValueTask<ConstraintEvaluationResult>

The constraint evaluation result.