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
actorIGovernanceActorContextThe actor associated with the challenge.
operationNamestringThe operation name requiring acknowledgment.
decisionGovernanceDecisionThe governance decision requiring acknowledgment.
metadataIReadOnlyDictionary<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_unboundcode.
HandleResponse(AcknowledgmentChallenge, IGovernanceActorContext, AcknowledgmentChallengeRequest, DateTimeOffset?)
Handles a host-submitted acknowledgment challenge response.
AcknowledgmentChallengeResult HandleResponse(AcknowledgmentChallenge challenge, IGovernanceActorContext actor, AcknowledgmentChallengeRequest response, DateTimeOffset? occurredUtc = null)
Parameters
challengeAcknowledgmentChallengeThe original acknowledgment challenge.
actorIGovernanceActorContextThe actor responding to the challenge.
responseAcknowledgmentChallengeRequestThe submitted response.
occurredUtcDateTimeOffset?Optional response timestamp.
Returns
- AcknowledgmentChallengeResult
The result of handling the response. An insufficient challenged or responding actor binding fails with
acknowledgment.challenge.actor_unboundand does not create an acknowledgment.