Class VerificationResult
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
Errors
Verification failures; empty when IsValid is true.
public required IReadOnlyList<VerificationError> Errors { get; init; }
Property Value
IsValid
True when signature, disclosures, key binding, and trust checks all pass.
public required bool IsValid { get; init; }
Property Value
Issuer
Information about the credential issuer and how its key was resolved.
public required IssuerInfo Issuer { get; init; }
Property Value
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
errorsIReadOnlyList<VerificationError>issuerIssuerInfo
Returns
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
errorVerificationErrorissuerIssuerInfo
Returns
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
disclosedClaimsIReadOnlyDictionary<string, object>issuerIssuerInfo