Oid4vpClient class
OpenID4VP holder client: fetch a request, match it against held
credentials, build the vp_token, and submit it.
Constructors
- Oid4vpClient(Oid4vcHttp _http, {Clock now = systemClock})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildVpToken(
{required SdJwtVc credential, required Iterable< String> revealClaims, required PresentationRequest req, required Es256Signer signer}) → Future<String> -
Builds the
vp_token: disclosesrevealClaims, computessd_hash, and signs the KB-JWT bound to the request'sclient_id/nonce. -
buildVpTokenMap(
{required List< CredentialMatch> matches, required PresentationRequest req, required Es256Signer signer}) → Future<Map< String, List< >String> > -
Builds the
vp_tokenin the OpenID4VP 1.0-final DCQL shape: a map from each matched query id to a one-element array holding that credential's presentation (SD-JWT…~<kb-jwt>). This is the shape bothdirect_postanddirect_post.jwtcarry in 1.0-final; hand it to submitResponse. -
buildVpTokenObject(
{required List< CredentialMatch> matches, required PresentationRequest req, required Es256Signer signer}) → Future<String> -
Builds a multi-credential
vp_token: a JSON object mapping each matched DCQL query id to its presentation. Use this instead of buildVpToken when the request asks for more than one credential; the result is a string ready to hand to submit. -
fetchRequest(
String authzRequestUriOrJar) → Future< PresentationRequest> -
Resolves an authorization request from a deep link, an inline request, or
a
request_urireference (handlingrequest_uri_method=post), and parses it into a PresentationRequest. -
match(
PresentationRequest req, List< SdJwtVc> held) → CredentialMatch? -
Picks the first held credential that satisfies a query in
req, ornullif none do. Matches onvctand on whether the requested claims are available; an empty claim set means "reveal the whole credential". For a request that asks for several credentials at once, use matchAll. -
matchAll(
PresentationRequest req, List< SdJwtVc> held) → List<CredentialMatch> -
One CredentialMatch per credential query in
reqthat some held credential satisfies — the multi-credential counterpart of match. Pair it with satisfiesRequest to honour the request'scredential_sets, then buildVpTokenObject to present them all. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseRequest(
String requestObjectJwt) → PresentationRequest - Parses an already-obtained Request Object JWT (JAR) without fetching. The signature is not verified here, but it is captured on PresentationRequest.signature so the wallet can authenticate the verifier.
-
present(
{required PresentationRequest req, required CredentialMatch match, required Es256Signer signer}) → Future< String?> -
One-call presentation of a single
match: build its KB-JWT-bound presentation, assemble the 1.0-finalvp_token, and submit it in whateverresponse_modethe request asked for (encrypting fordirect_post.jwt). Returns the verifier'sredirect_uri, if any. -
satisfiesRequest(
PresentationRequest req, List< CredentialMatch> matches) → bool -
Whether
matchessatisfyreq: every requiredcredential_setsentry has at least one fully-matched option, or — when the request states no sets — every listed credential is matched. -
submit(
{required PresentationRequest req, required String vpToken}) → Future< String?> -
Submits the
vp_tokento the verifier'sresponse_uri(direct_post). Returns theredirect_urithe verifier sends back, if any. -
submitResponse(
{required PresentationRequest req, required Map< String, List< vpToken}) → Future<String> >String?> -
Submits a 1.0-final
vpTokento the verifier'sresponse_uri, honouringresponse_mode: -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited