Interface IAttemptRecordingSessionStore
- Namespace
- Tessio.Verifier.AspNetCore
- Assembly
- Tessio.Verifier.AspNetCore.dll
An ISessionStore that can record a response which failed verification without completing the session. Everything about a session's failed attempts, as opposed to its outcome, belongs here.
public interface IAttemptRecordingSessionStore : ISessionStore
- Inherited Members
Remarks
CompleteOnlyOnValidResponse requires it: with that option on, the wallet callback throws when it is first built against a store without it, rather than completing sessions the option says to keep open. It is a separate interface because ISessionStore is frozen, so a store written against contracts-v0 keeps compiling. The built-in InMemorySessionStore implements it.
Methods
RecordFailedAttemptAsync(string, VerificationResult, CancellationToken)
Records failure as the session's LastFailure
and increments FailedAttempts, leaving the session
Pending. Does nothing when the session is no longer pending,
so a failure that loses a race with a valid response cannot overwrite it.
Task RecordFailedAttemptAsync(string sessionId, VerificationResult failure, CancellationToken ct = default)
Parameters
sessionIdstringfailureVerificationResultctCancellationToken