- Support parsing
vp_tokenvalues that are DCQL credential response wrappers.
- If OID4VCI server supports
authorization_details, include it in the access token request.
- Build OID4VCI 1.0 compliant credential requests and improve general offer processing and matching against credential configurations.
- Improve
client_idVPR conversion when usingredirect_urias a prefix. The client ID should be used as thedomainin a VPR and it should include its prefix if present. When convertingdomainvalue from a VPR that includes a prefix, it should be stripped to populate the default value forresponse_uriwhen that same prefix is used.
- Add
getPostBody()option tooid4vp.authzRequest.get()that can be passed in support of the optionalrequest_uri_method=postOID4VP 1.0+ parameter. The function must return an object (or a Promise that resolves to such an object) withbodyset to the POST body that will be sent to the server when requesting the authorization request, provided that the server announces it uses the POST method for providing the authorization request. Thebodyvalue is expected to be aURLSearchParamsinstance that expresses the desired parameters defined in OID4VP 1.0 section 5.10. - Use
request_uri_method=postif parsed from authz request URL. - Map
expected_origins[0]todomainwhen converting an authz request that uses a DC API response mode and includes noresponse_uri.
- Add
oid4vp.mdl.encodeSessionTranscript()API. This API can be called withhandoveroptions to return an mDL SessionTranscript variant for implementing ISO-18013-7 (various annexes). - Include
recipientPublicJwk,recipientPublicJwkThumbprint, andvpTokenMediaType(when detectable) in return value fromoid4vp.authzResponse.parseAuthorizationResponse(). - Allow
authorizationRequestto be passed tooid4vp.authzResponse.parseAuthorizationResponse()to allow for more accurateresponseModedetection and validation. - Support creating ISO 18013-7 DC API (Annex C and D) responses.
- Support parsing ISO 18013-7 DC API (Annex C and D) responses.
- Re-release of 5.7.1; no changes.
- Handle VPR => PE conversion for property existence queries by ensuring empty strings only generate a type check and not a literal equality constraint.
- Add support for string values in
acceptedCryptosuitesand object values inacceptedEnvelopesin VPR queries.
- Handle VPR => PE conversion case with a VPR that has no
QueryByExampleor noDIDAuthenticationqueries.
- No-op; re-release of 5.6.1.
- Ensure
submission_requirementsis used in presentation exchange to differentiate between different groups of acceptable inputs. The "group" terminology used in VPR and the "group" terminology in PE is not identical; in VPR, a singlegroupis always selected, but in PE the selection criteria is determined bysubmission_requirementsrules that indicate how to pickinput_descriptors. So, each VPR group is mapped to a PEinput_descriptor, but each one is in the same PE "group". Finally thesubmission_requirementsindicate that a singleinput_descriptorfrom the PE "group" must be selected.
- Add support for credential and presentation format requirements
in presentation definition format section (
presentation_definition.format).
- Add support for credential format requirements (
ldp_vcandjwt_vc_json) in presentation definition input descriptors when converting from VPR.
- Fix DCQL
type_valuesnesting level.
- Add
vp_formats.jwt_vpandvp_formats.jwt_vp_jsontoclient_metadatawhen converting VPR => authz request (for backwards compatibility).
- Improve
DIDAuthenticationquery conversion between OID4VP authorization requests w/DCQL and VPR. Now, if multipleDIDAuthenticationqueries are provided in a VPR, the merged accepted accepted cryptosuites and envelopes will appear in the authz request'svp_formats_supportedfield instead of only using the lastDIDAuthenticationquery's values. When converting from an authz request to a VPR, multipleDIDAuthenticationqueries will be generated (one per group as needed), even if they are duplicates, so as to ensure eachgrouphas aDIDAuthenticationquery.
- Add
encryptionOptions.encoption for encrypting authz responses usingA128GCM.
- Fix bug related to typo w/
vp_formats_supported. - Generate
presentation_definitionfor zero or greater than oneQueryByExamplewhen converting query formats. - Do not generate empty
credentials/credential_setsin DCQL queries.
- Add support for converting
QueryByExampleto/from DCQL. - Add
queryAPI with these utilities:query.credentialMatches({credential, map}): Returns whether the given credential matches the given JSON pointer map. A JSON pointer map must be generated using one of the follow methods:query.dcql.toJsonPointerMap(...): Converts a DCQLcredentialquery to a JSON pointer map.query.presentationExchange.toJsonPointerMap(...): Converts a presentation exchange input descriptor to a JSON pointer map.query.queryByExample.toJsonPointerMap(...): Converts aQueryByExampleexampleobject to a JSON pointer map.
- Add
oid4vp.verifier.parseAuthorizationResponse()helper that OID4VP verifiers can use to parse authorization responses.
- When
getVerificationKeyis not passed when getting a signed authorization request, if thex5cclaim is present, automatically use the public key from its leaf certificate to verify the JWT. This is the expected behavior forx509_san_dnsandx509_hashanyway. If other schemes are supported by the caller, they must providegetVerificationKeyand can return the passedcertificatePublicKeyfor those schemes and another key for other schemes (such as DID-based schemes, which will require a DID resolver to be used). The unprotectedschemeand unprotectedauthorizationRequestare passed to enable checking of the scheme or other parameters that might be needed to make a key decision consistent with what is to be verified. - The parameter
getTrustedCertificates({x5c, chain, authorizationRequest})must be provided when getting an authorization request if any of thex509_*client ID schemes are supported by the caller. This function must return an array of PEM or base64-encoded certificates, each of which will be considered trusted, i.e., if any of these certificates is found when verifying a certificate chain, the verification process will halt assuming trust has been established, even if the trusted certificate found is not a root certificate.
- BREAKING: Remove support for
client_metadata_uriandpresentation_definition_uriin authorization responses. These have been removed from the latest OID4VP specification, are considered unnecessarily complex, and are predicted to be very rarely used.
- Add OID4VP encrypted authz response implementation.
- Add OID4VP signed authz request verification. When getting an
authorization request, a (optionally async)
getVerificationKey({protectedHeader})function must be provided as an option in order to provide key material for verification. If not provided when a signed authz request is required based on the client ID scheme/prefix or client metadata, then aNotFoundErrorwill be thrown during JWT verification. - Add support for OID4VP
direct_post.jwtresponse mode. - Add
selectJwk()utility. - Expose authz request, authz response, and convert utilities via
oid4vp.authzRequest.*,oid4vp.authzResponse.*, andoid4vp.convert.*respectively. Future releases may make these more easily importable as individual symbols w/tree-shaking support.
- Update dependencies.
- Add
getNonceto client API for use with OID4VCInonce_endpoint. - Add option to pass
noncetorequestCredential(s).
- Update dependencies.
- Auto-detect whether to include
vcin the JSON paths when computing presentation definition constraints from a VPR.
- Ensure duplicate paths aren't used when generating a VPR from a presentation definition.
- BREAKING: Use
allOfinstead of an invalidcontainswith an array value when generating presentation filters from a VPR.
- Accept
allOfin combination withcontainsfor array schemas.
- Add support for fetching credential offer from
credential_offer_uriviagetCredentialOffer(). - Improve automatic credential definition selection from a credential offer
based on the specified
format.
- Add support for issuer configuration URLs that do not match RFC 8414,
but instead match the OID4VCI spec, i.e.,
<issuer>/.well-known/...will be accepted and not just<issuer origin>/.well-known/.../<issuer path>. - Add support for parsing and using credential offers with
credentialsorcredential_configuration_idsthat include credential configuration IDs that are present in the issuer configuration.
- Allow
vpTokenparam to be given when sending an authorization response. This param is optional and does not replace theverifiablePresentationparameter which is required to build the presentation submission. ThevpTokenparam can be used if the format of thevp_tokenis not the plain JSON expression of theverifiablePresentation, but is instead some enveloping format that wraps the VP, such as a JWT (as in VC-JWT).
- Ensure
presentation_requirederror is properly nested.
- Allow
formatto be passed when requesting credentials.
- Allow any
formatto be used in credential requests.
- Update
@digitalbazaar/http-clientto 4.0.0.
- Add
prefixJwtVcPathoption to add an additional JSON path that includes the JWT W3C VC 1.1 'vc' prefix to presentation definition constraints fields.
- Add basic OID4VP support. There are many differences in OID4VP implementations in the ecosystem today and OID4VP is still in draft form. This implementation supports a profile of draft 20 that uses LDP / Data Integrity secured VCs and provides utility functions for converting a subset of VPRs to authorization requests and vice versa. This OID4VP implementation should be considered experimental as the ecosystem matures and changes are made.
- Ensure authorization server metadata is retrieved along with credential
issuer metadata. This information is combined to create the
issuerConfigstored in the client. The client also storesmetadatawith the original metadata from each to allow differentiation as needed. A future version may removeissuerConfigto avoid any conflation that was the result of previous versions of the OID4VCI spec and implementations built off of this client.
- BREAKING: The client now uses
.well-known/openid-credential-issuerinstead of.well-known/oauth-authorization-serverto match the current version of the OID4VCI spec as of this date.
- Initial release, see individual commits for history. Notably,
no version 1.x was released under this name, instead it was
released as
@digitalbazaar/oidc4vci-client.