Class VerificationContext
- Namespace
- Tessio.Verifier.Core
- Assembly
- Tessio.Verifier.Core.dll
Per-verification context the verifier needs to validate freshness, audience, and credential type.
public sealed record VerificationContext : IEquatable<VerificationContext>
- Inheritance
-
VerificationContext
- Implements
- Inherited Members
Remarks
FROZEN contract (contracts-v0). Forward-compatible: new optional inputs are added as init-only properties without breaking existing callers. ExpectedVctValues was added that way rather than by widening ExpectedVct, which the freeze does not allow.
Properties
Audience
The verifier's identifier; must match the KB-JWT audience.
public required string Audience { get; init; }
Property Value
ExpectedVct
Optional expected credential type (SD-JWT VC vct claim). One accepted type, for a request
that asks for exactly one. See ExpectedVctValues for the general case.
public string? ExpectedVct { get; init; }
Property Value
ExpectedVctValues
Optional accepted credential types, for a request whose DCQL entry offers several.
public IReadOnlyList<string>? ExpectedVctValues { get; init; }
Property Value
Remarks
SPEC: OpenID4VP 1.0 §B.3.5 defines vct_values as "A non-empty array of strings that
specifies allowed values for the type of the requested Verifiable Credential", and §8.6 requires
the Verifier to "validate that the returned Credential(s) meet all criteria defined in the
query". The query states a SET, so the verifier accepts any member of it.
Membership is exact. §B.3.5 also permits the Wallet to return a Credential that INHERITS from a listed type, which this verifier refuses, because following that inheritance needs SD-JWT VC Type Metadata and nothing here retrieves it. That is narrower than the specification allows and it fails closed. List each accepted type explicitly.
This property and ExpectedVct are read together: the verification accepts a credential whose type is ExpectedVct or any entry here. When both are null or empty, the type check is skipped.
Nonce
The nonce the verifier issued for this presentation; must match the KB-JWT nonce.
public required string Nonce { get; init; }