Table of Contents

Class WalletResponseVerifier

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

Default IWalletResponseVerifier. Parses a wallet response format-aware (from the session's request), then verifies each credential with expectations derived from that same request — audience from client_id, nonce, and the requested vct / docType — rather than from the process-wide VerifierOptions. Verifying against the session's own client_id is what makes the seam multi-tenant correct, and it also closes the app-wide-audience gap for the built-in callback endpoint, which routes through VerifyParsedAsync(VerificationSession, ParsedWalletResponse, CancellationToken).

public sealed class WalletResponseVerifier : IWalletResponseVerifier
Inheritance
WalletResponseVerifier
Implements
Inherited Members

Constructors

WalletResponseVerifier(ICredentialVerifier, MdocVerifier, ResponseEncryptionKeyStore)

Creates a verifier over the SD-JWT VC and mdoc credential verifiers.

public WalletResponseVerifier(ICredentialVerifier verifier, MdocVerifier mdocVerifier, ResponseEncryptionKeyStore encryptionKeys)

Parameters

verifier ICredentialVerifier
mdocVerifier MdocVerifier
encryptionKeys ResponseEncryptionKeyStore

Methods

CanVerify(PresentationRequest)

Whether a stored request still carries the DCQL query verification checks a response against. It is a check on the request being present and readable, not on every parameter in it: a request that passes here can still be missing a response_uri, and an mdoc response would then fail device authentication.

public static bool CanVerify(PresentationRequest request)

Parameters

request PresentationRequest

Returns

bool

Remarks

For a host that persists sessions itself. A request delivers its parameters either as claims in its signed request object or as plain query parameters, and rows written before a host persisted either one have neither. Call this first and refuse such a session.

Verifying one instead does not fail cleanly, it fails in two different wrong ways. The audience and nonce still hold, because those come from the session rather than from the request, but the credential type goes unchecked: no expected type skips the type comparison (SdJwtVcVerifier) and a null ExpectedDocType skips the document-type comparison (MdocVerifier), so a credential of the wrong type passes. Meanwhile an mdoc response fails device authentication, because the transcript it signs covers a response_uri this session can no longer produce. Neither outcome tells the caller what actually went wrong.

VerifyAsync(VerificationSession, WalletResponseData, CancellationToken)

Parses response (picking SD-JWT vs mdoc from the session's request, so mixed-format tenants share one process) and verifies every presented credential against session. A malformed or undecryptable response yields an invalid result (error code response_invalid) rather than throwing, so the caller can always complete the session with the outcome.

public Task<VerificationResult> VerifyAsync(VerificationSession session, WalletResponseData response, CancellationToken ct = default)

Parameters

session VerificationSession
response WalletResponseData
ct CancellationToken

Returns

Task<VerificationResult>