Table of Contents

Class VerificationResult

Namespace
Tessio.Verifier.Core
Assembly
Tessio.Verifier.Core.dll

Outcome of credential verification. Carries the disclosed claims, issuer info, and any failure reasons.

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

Remarks

FROZEN contract (contracts-v0).

Properties

DisclosedClaims

The claims the holder elected to disclose, keyed by claim name. Empty when IsValid is false. Values are dynamic JSON values represented as object (string, number, bool, list, dict, or null).

public required IReadOnlyDictionary<string, object> DisclosedClaims { get; init; }

Property Value

IReadOnlyDictionary<string, object>

Errors

Verification failures; empty when IsValid is true.

public required IReadOnlyList<VerificationError> Errors { get; init; }

Property Value

IReadOnlyList<VerificationError>

IsValid

True when signature, disclosures, key binding, and trust checks all pass.

public required bool IsValid { get; init; }

Property Value

bool

Issuer

Information about the credential issuer and how its key was resolved.

public required IssuerInfo Issuer { get; init; }

Property Value

IssuerInfo

Methods

Invalid(IReadOnlyList<VerificationError>, IssuerInfo?)

A failing result carrying every accumulated error and, optionally, the resolved issuer. Falls back to Unknown when no issuer was reached.

public static VerificationResult Invalid(IReadOnlyList<VerificationError> errors, IssuerInfo? issuer = null)

Parameters

errors IReadOnlyList<VerificationError>
issuer IssuerInfo

Returns

VerificationResult

Invalid(VerificationError, IssuerInfo?)

A failing result carrying one error and, optionally, the issuer that was resolved.

public static VerificationResult Invalid(VerificationError error, IssuerInfo? issuer = null)

Parameters

error VerificationError
issuer IssuerInfo

Returns

VerificationResult

Valid(IReadOnlyDictionary<string, object>, IssuerInfo)

A passing result carrying the disclosed claims and resolved issuer. Convenience for tests and self-driving hosts that synthesize results rather than fully initializing every required member.

public static VerificationResult Valid(IReadOnlyDictionary<string, object> disclosedClaims, IssuerInfo issuer)

Parameters

disclosedClaims IReadOnlyDictionary<string, object>
issuer IssuerInfo

Returns

VerificationResult