Table of Contents

Interface IAcknowledgmentChallengeService

Namespace
AsiBackbone.AspNetCore.Acknowledgments
Assembly
AsiBackbone.AspNetCore.dll

Builds and handles ASP.NET Core-friendly acknowledgment challenges without assuming a specific UI framework.

public interface IAcknowledgmentChallengeService

Methods

CreateChallenge(IGovernanceActorContext, string, GovernanceDecision, IReadOnlyDictionary<string, string>?)

Creates an acknowledgment challenge from an acknowledgment-required governance decision.

AcknowledgmentChallenge CreateChallenge(IGovernanceActorContext actor, string operationName, GovernanceDecision decision, IReadOnlyDictionary<string, string>? metadata = null)

Parameters

actor IGovernanceActorContext

The actor associated with the challenge.

operationName string

The operation name requiring acknowledgment.

decision GovernanceDecision

The governance decision requiring acknowledgment.

metadata IReadOnlyDictionary<string, string>

Optional host-provided challenge metadata.

Returns

AcknowledgmentChallenge

A host-friendly acknowledgment challenge.

Exceptions

InvalidOperationException

Thrown when the decision does not require acknowledgment or the actor lacks a distinct, known, authenticated binding. The latter failure includes the stable acknowledgment.challenge.actor_unbound code.

HandleResponse(AcknowledgmentChallenge, IGovernanceActorContext, AcknowledgmentChallengeRequest, DateTimeOffset?)

Handles a host-submitted acknowledgment challenge response.

AcknowledgmentChallengeResult HandleResponse(AcknowledgmentChallenge challenge, IGovernanceActorContext actor, AcknowledgmentChallengeRequest response, DateTimeOffset? occurredUtc = null)

Parameters

challenge AcknowledgmentChallenge

The original acknowledgment challenge.

actor IGovernanceActorContext

The actor responding to the challenge.

response AcknowledgmentChallengeRequest

The submitted response.

occurredUtc DateTimeOffset?

Optional response timestamp.

Returns

AcknowledgmentChallengeResult

The result of handling the response. An insufficient challenged or responding actor binding fails with acknowledgment.challenge.actor_unbound and does not create an acknowledgment.