[WAL-1158] fix(openid4vci): align wallet nonce handling with 1.0#1937
[WAL-1158] fix(openid4vci): align wallet nonce handling with 1.0#1937szijpeter wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fe7126e to
1ad6dad
Compare
c2772ec to
0345cb7
Compare
0345cb7 to
1b0a1d3
Compare
2e5f1be to
ea627ee
Compare
bff82e2 to
693fe56
Compare
|



Summary
Implements WAL-1158 as the wallet-side OpenID4VCI 1.0 correction for proof nonce handling and
invalid_noncerecovery.When an issuer advertises
nonce_endpoint, the wallet obtains a freshc_noncefor each proof-bound credential request. When it does not, the wallet still creates the required proof without anonceclaim; token-responsec_noncevalues and access tokens are never used as proof nonces.The matching enterprise consumer is walt-id/waltid-identity-enterprise#547.
What Changed
NonceRequestBuilderfor nonce-endpoint responses with sanitized failuresnonceclaim when no nonce was obtainedc_nonceand access-token fallback from proof construction and isolated token resultsinvalid_nonceerror, using a newly fetched nonce and freshly signed prooffetch-credentialcalls single-shot and propagates the typed credential error so API clients explicitly control any retryinvalid_noncecredential error to the Wallet2 HTTP API responseArchitecture Notes
NonceRequestBuilderis deliberately a small protocol client: it requests and parses the nonce response, preserves cancellation, and redacts malformed response material. The higher-level issuance flow owns the bounded retry because it alone can fetch a nonce and regenerate a proof safely.The wallet intentionally applies no HTTPS-enforcement or redirect-rejection policy to
nonce_endpoint; transport reachability remains the HTTP client's concern. This is the agreed non-standard-compliance trade-off for these PRs.This PR is the prerequisite for walt-id/waltid-identity#1935, which is restacked to consume the shared implementation instead of carrying WAL-1158 inside the broader WAL-995 change.
Caveats and Follow-Ups
invalid_nonceerror. Other credential errors propagate unchanged.Breaking Changes
TokenRequestBuilder.TokenResponse.c_nonceandc_nonce_expires_inare removed.RequestTokenResult.cNonceis removed.RequestNonceResult.nonceand proof-builder nonce inputs are nullable so issuers can require proofs without advertising a Nonce Endpoint.