Table of Contents

Class DcqlCredentialQuery

Namespace
Tessio.Verifier.OpenId4Vp
Assembly
Tessio.Verifier.OpenId4Vp.dll

One Credential Query, with an id of its own, for a DCQL query that asks for several credentials: pass it to Query(IReadOnlyList<DcqlCredentialQuery>, params DcqlCredentialSet[]) or AnyOf(params DcqlCredentialQuery[]).

public sealed class DcqlCredentialQuery
Inheritance
DcqlCredentialQuery
Inherited Members

Remarks

The id is what ties the request to the answer. The wallet keys each presentation in vp_token by the id of the Credential Query it answers (OpenID4VP 1.0 section 8.1), so the verifier reads that presentation in this entry's format and checks it against this entry's type. Pick an id that says which alternative it is, such as pid_mdoc and pid_sd_jwt, because the verification result reports it.

Validated when it is made, by the rules the single-credential builders apply to theirs: the claims, the claim sets and the type are checked here, and the id by section 6.1.

Properties

Id

The Credential Query id, which keys this entry's answer in vp_token.

public string Id { get; }

Property Value

string

Methods

Mdoc(string, string, IReadOnlyList<DcqlClaim>, params string[][])

An mdoc Credential Query of document type docType, requesting claims by path, as MdocByPath(string, IReadOnlyList<DcqlClaim>, params string[][]) builds it but under the id id.

public static DcqlCredentialQuery Mdoc(string id, string docType, IReadOnlyList<DcqlClaim> claims, params string[][] claimSets)

Parameters

id string

The Credential Query id: letters, digits, underscore and hyphen, unique in the query.

docType string

The mdoc document type, which becomes meta.doctype_value.

claims IReadOnlyList<DcqlClaim>

Every claim the entry may ask for, each path the full [namespace, element] of section 7.2. At least one.

claimSets string[][]

Each entry is a list of Id values, and ORDER IS THE PREFERENCE. Pass none to request every claim.

Returns

DcqlCredentialQuery

Exceptions

ArgumentException

The id, the type, a claim or a claim set breaks a rule the specification states.

SdJwtVc(string, IReadOnlyList<string>, IReadOnlyList<DcqlClaim>, params string[][])

An SD-JWT VC Credential Query of ANY of vctValues, requesting claims by path, as SdJwtVcByPath(IReadOnlyList<string>, IReadOnlyList<DcqlClaim>, params string[][]) builds it but under the id id.

public static DcqlCredentialQuery SdJwtVc(string id, IReadOnlyList<string> vctValues, IReadOnlyList<DcqlClaim> claims, params string[][] claimSets)

Parameters

id string

The Credential Query id: letters, digits, underscore and hyphen, unique in the query.

vctValues IReadOnlyList<string>

Credential types to accept. At least one, any of which matches.

claims IReadOnlyList<DcqlClaim>

Every claim the entry may ask for, each addressed by path. At least one.

claimSets string[][]

Each entry is a list of Id values, and ORDER IS THE PREFERENCE. Pass none to request every claim.

Returns

DcqlCredentialQuery

Exceptions

ArgumentException

The id, a type, a claim or a claim set breaks a rule the specification states.