Table of Contents

Class VerificationSession

Namespace
Tessio.Verifier.AspNetCore
Assembly
Tessio.Verifier.AspNetCore.dll

A verification session tracked by ISessionStore.

public sealed record VerificationSession : IEquatable<VerificationSession>
Inheritance
VerificationSession
Implements
Inherited Members

Remarks

FROZEN contract (contracts-v0).

Properties

CreatedAt

Session creation timestamp (UTC).

public required DateTimeOffset CreatedAt { get; init; }

Property Value

DateTimeOffset

ExpiresAt

Absolute session expiration (UTC). Stores should transition stale sessions to Expired.

public required DateTimeOffset ExpiresAt { get; init; }

Property Value

DateTimeOffset

FailedAttempts

How many responses failed verification while the session stayed pending. Zero until the first.

public int FailedAttempts { get; init; }

Property Value

int

Remarks

Counted rather than inferred from LastFailure, because two failures can carry equal results and a reader watching for a new one needs something that always moves. Added to this frozen record as an optional init-only property, which contracts-v0 permits.

LastFailure

The most recent response that failed verification while the session stayed Pending, or null when there has been none.

public VerificationResult? LastFailure { get; init; }

Property Value

VerificationResult

Remarks

Set by RecordFailedAttemptAsync(string, VerificationResult, CancellationToken), which the built-in wallet callback calls only when CompleteOnlyOnValidResponse is on. With it off, a failing response completes the session and is read from Result instead. The built-in store keeps it after a later valid response completes the session. Added to this frozen record as an optional init-only property, which contracts-v0 permits.

Request

The presentation request issued for this session.

public required PresentationRequest Request { get; init; }

Property Value

PresentationRequest

Result

Verification result; non-null only when Status is Completed.

public VerificationResult? Result { get; init; }

Property Value

VerificationResult

SessionId

Stable opaque session identifier; used as the SSE channel key and wallet-callback correlation.

public required string SessionId { get; init; }

Property Value

string

Status

Current lifecycle state.

public required VerificationSessionStatus Status { get; init; }

Property Value

VerificationSessionStatus