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
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
idstringThe Credential Query id: letters, digits, underscore and hyphen, unique in the query.
docTypestringThe mdoc document type, which becomes
meta.doctype_value.claimsIReadOnlyList<DcqlClaim>Every claim the entry may ask for, each path the full
[namespace, element]of section 7.2. At least one.claimSetsstring[][]Each entry is a list of Id values, and ORDER IS THE PREFERENCE. Pass none to request every claim.
Returns
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
idstringThe Credential Query id: letters, digits, underscore and hyphen, unique in the query.
vctValuesIReadOnlyList<string>Credential types to accept. At least one, any of which matches.
claimsIReadOnlyList<DcqlClaim>Every claim the entry may ask for, each addressed by path. At least one.
claimSetsstring[][]Each entry is a list of Id values, and ORDER IS THE PREFERENCE. Pass none to request every claim.
Returns
Exceptions
- ArgumentException
The id, a type, a claim or a claim set breaks a rule the specification states.