Join our Newsletter — 33% off our NHI Course
Home› Guides› OpenID for Verifiable Presentations (OpenID4VP) Guide: Requesting and…
Guide Customer Identity

OpenID for Verifiable Presentations (OpenID4VP) Guide: Requesting and Verifying Wallet Credentials

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 14 min read
On this page

Relying parties that accept credentials from digital identity wallets need a protocol that proves who is asking, gets only the data needed, and stops a captured presentation being replayed somewhere else. OpenID for Verifiable Presentations (OpenID4VP) 1.0, a Final specification of the OpenID Foundation since 9 July 2025, is that protocol for remote presentation: it is used by the EU Digital Identity Wallet, by OpenID4VC High Assurance Interoperability Profile (HAIP) deployments and by browsers through the W3C Digital Credentials API. This guide covers the request and response model, the Digital Credentials Query Language (DCQL), verifier identification, the response modes and their attacks, VP Token validation and fraud controls. It is for engineers and architects building verifiers at banks, platforms and public services, and for security teams assessing them.

Key takeaways

  • OpenID4VP is OAuth-shaped but returns credentials, not tokens. The verifier sends an Authorization Request with a dcql_query; the wallet returns a vp_token holding one or more presentations keyed by query id.
  • Replay protection rests on two values. Every holder-bound presentation must be bound to the verifier's client_id (as audience) and the request nonce, and the verifier must reject any presentation where either is wrong.
  • The verifier, not the wallet, enforces policy. The specification says verifiers must not rely on the wallet to enforce DCQL constraints and must run their own checks on every credential returned.
  • Cross-device flows carry the most risk. direct_post enables QR code flows but is open to session fixation and relayed QR phishing; the Digital Credentials API reduces both by giving the wallet a browser-verified origin.
  • Use a profile. OpenID4VP has many options. HAIP 1.0 (Final, December 2025) fixes the choices for high assurance ecosystems such as the EUDI Wallet: x509_hash client identifiers, encrypted responses, DCQL and the DC API.

How OpenID4VP works

OpenID4VP extends OAuth 2.0 (RFC 6749) and JWT-Secured Authorization Requests (RFC 9101). The verifier plays the OAuth client and the wallet plays the authorisation server, but instead of an access token the response carries Verifiable Presentations. Three invocation patterns exist.

FlowHow the wallet is reachedResponse pathMain risks
Same-device redirectCustom URI scheme (for example openid4vp://) or universal or app linkRedirect with fragment, or direct_post plus a redirect_uri back to the verifier frontendWallet selection by URI scheme, scheme hijacking, request tampering if unsigned
Cross-device QR codeQR code holding only client_id and request_uridirect_post or direct_post.jwt to the verifier's response_uriSession fixation, relayed QR phishing, no shared browser session
Digital Credentials APInavigator.credentials.get() with a digital member, or the native platform equivalentReturned to the calling page through the API (dc_api or dc_api.jwt)Fewer: the platform supplies the verifier origin and runs proximity checks for cross-device use

A typical request carries response_type=vp_token, client_id, nonce, dcql_query, response_mode and, for direct_post, a response_uri. Requests are usually passed by reference: the QR code or link holds a request_uri and the wallet fetches a signed Request Object. With request_uri_method=post the wallet can send its own metadata and a wallet_nonce, which the verifier must echo inside the signed Request Object, so a pre-generated request cannot be replayed to the wallet.

Asking for data with DCQL

DCQL replaced the earlier Presentation Exchange syntax in the Final specification. A query lists credentials (required) and optional credential_sets. Each Credential Query has an id, a format such as dc+sd-jwt or mso_mdoc, a meta block (for SD-JWT VC, the accepted vct values), and a claims list of path pointers.

  • Minimise by design: request named claims, not the whole credential. Wallets must not disclose selectively disclosable claims that were not selected. For SD-JWT internals see the SD-JWT and SD-JWT VC Guide.
  • Alternatives with claim_sets and credential_sets: state preferred and fallback combinations (for example a PID or a driving licence) rather than asking for both.
  • Holder binding: require_cryptographic_holder_binding defaults to true. Turning it off means accepting a credential that anyone holding a copy could present.
  • Trusted issuers: trusted_authorities can name accepted issuers by Authority Key Identifier (aki), ETSI trusted list (etsi_tl) or OpenID Federation. HAIP requires aki support. This filters what the wallet offers; it does not replace verifier-side issuer validation.
  • Purpose: show the user why each attribute is needed before sending the request. In the EUDI ecosystem the wallet also checks that you asked for no more than your registration allows.

Identifying the verifier: client identifier prefixes

The wallet has to know who is asking before it shows the consent screen. OpenID4VP encodes the trust mechanism in the client_id as <prefix>:<identifier>.

PrefixHow the wallet authenticates the verifierUse when
redirect_uriNot authenticated; unsigned requests onlyLow-risk testing only
x509_san_dnsRequest signed with a key whose certificate has a DNS SAN matching the identifierWeb verifiers in a PKI-based trust framework
x509_hashRequest signed with a certificate whose hash equals the identifierRequired by HAIP 1.0 for signed requests, so EUDI-style ecosystems
verifier_attestationA Verifier Attestation JWT from a trusted party, plus proof of possessionEcosystems that issue attestations to approved verifiers
openid_federationTrust chain resolved through OpenID FederationFederations of many verifiers and issuers
decentralized_identifierKeys resolved from a DID documentDID-based ecosystems
originReserved: set by the wallet for the DC API from the browser-supplied origin; wallets must not accept it in requestsNever sent by the verifier
No prefixTreated as pre-registered with the walletClosed ecosystems with a single wallet

The full client identifier, including the prefix, is what goes into the presentation's audience. The specification warns that confusing a prefixed and an unprefixed identifier enables attacks, so compare the whole string. In the EUDI Wallet framework, each Relying Party Instance also holds an access certificate from its Member State's registrar ecosystem and a registration certificate describing intended uses and attributes, which the wallet checks. See the Relying Party Integration with Digital Identity Wallets Guide.

Response modes and their attacks

  • fragment (default): the response returns through a redirect on the same device. An attacker can relay a request to a victim, but has no way to get the resulting VP Token. Responses can exceed URL limits, which is why direct_post exists.
  • direct_post: the wallet POSTs the response to the verifier's response_uri. When response_uri is present, redirect_uri must not be. This mode is susceptible to session fixation: the attacker starts a session on their device, relays the request to a victim, and polls until the victim's wallet completes it.
  • Response Code defence: on same-device direct_post, the response endpoint returns a redirect_uri containing a fresh secret Response Code, and the frontend must present it to fetch the result. This does not work cross-device, because the wallet's browser lacks the original session.
  • direct_post.jwt and dc_api.jwt: the response is encrypted to the verifier (HAIP: ECDH-ES on P-256 with A128GCM or A256GCM). Encryption protects personal data in transit and in intermediaries. Because encryption uses the verifier's public key, it does not authenticate the sender; integrity still comes from the signed presentations.

Cross-device flows are the target of Cross-Device Consent Phishing, now documented in RFC 10027 (BCP 247, August 2026): the attacker places a genuine QR code in a lure and the victim approves it. Mitigations include short-lived requests, proximity checks and clear context on the consent screen; the BCP advises avoiding cross-device flows where the risk cannot be reduced. See the Cross-Device Flow Security Guide and the QR Code Phishing (Quishing) Guide.

The Digital Credentials API path

The W3C Digital Credentials API (Working Draft, 20 October 2026, Federated Identity Working Group) lets a web page call navigator.credentials.get({digital: {requests: [{protocol, data}]}}). The registered presentation protocols are openid4vp-v1-unsigned, openid4vp-v1-signed, openid4vp-v1-multisigned and org-iso-mdoc.

  • Origin binding: the platform passes the verifier's origin to the wallet. For SD-JWT VC over the DC API, the KB-JWT aud must be origin: followed by that origin, so a presentation phished on a look-alike site is bound to the wrong audience.
  • expected_origins: required in signed DC API requests; the wallet compares it with the browser-supplied origin by exact string match and errors on mismatch. This stops a malicious site replaying your signed request.
  • User activation and policy: calls need transient user activation, run only in secure contexts, and are governed by the digital-credentials-get permissions policy (default 'self'), so cross-origin iframes need an explicit allow.
  • No session fixation by design: the response returns to the page that asked, and cross-device use runs over platform transports with proximity checks.

The trade-off is reach: the DC API depends on browser and operating system support, so most verifiers will run it alongside a redirect or QR fallback during transition. HAIP 1.0 requires wallets to support the DC API.

Validating the VP Token

OpenID4VP sets out the validation order; format-specific checks come from SD-JWT VC or ISO/IEC 18013-5. If any check on an individual presentation fails, discard it; if the overall response fails, reject the VP Token.

  1. Correlate the response: match state to a recent request you issued, and protect the internal interface between your response endpoint and frontend (component authentication, or separate random values for wallet state and result retrieval).
  2. Decrypt if you requested an encrypted response, and reject plaintext responses where encryption was required.
  3. Check structure: the vp_token object keys must be your DCQL ids, each value an array, with exactly one presentation where multiple was false.
  4. Verify issuer signature and trust: issuer key to a trust anchor your policy allows (for EUDI, trusted lists), credential type, validity period.
  5. Verify holder binding: for SD-JWT VC, the KB-JWT nonce equals your request nonce and aud equals your full client identifier (or origin:<origin> over the DC API); for mdoc, the device signature over the SessionTranscript.
  6. Check status (Token Status List or the mdoc mechanism) according to your policy.
  7. Check the result against your own query: required claims present, no surprise credentials, values within expected ranges.
  8. Bind identity correctly: if you authenticate a returning user from a credential claim, the claim must be stable and never reassigned, and you must combine it with the issuer identifier.

If you send transaction_data (for example to bind a payment or a qualified signature to the presentation), confirm the wallet included it in the holder-bound proof. A wallet that does not support it must refuse the request with invalid_transaction_data rather than return a VP Token.

Implementation roadmap

  1. Choose the profile and trust framework: HAIP 1.0 for EUDI and similar ecosystems, plus the national or sector rules that tell you which issuers and trust lists to accept.
  2. Register and obtain certificates: in the EUDI ecosystem, register as a relying party and obtain access and registration certificates before production. Keep request-signing keys in an HSM.
  3. Build with a conformant library and run the OpenID Foundation conformance tests for OpenID4VP; the specification itself points to them.
  4. Start same-device and DC API, then add cross-device QR with short-lived request_uri values, request_uri_method=post and encrypted responses.
  5. Run in shadow mode: verify presentations alongside your existing identity check, compare outcomes and tune error handling, including wallet_unavailable and user cancellation.
  6. Enforce in rings (staff, pilot customers, everyone) with a rollback switch to the previous onboarding path, never to unverified acceptance.
  7. Review data retention: store the verification result and the claims you need, not the raw presentation, unless law requires it.

Small verifiers can usually rely on a certified verifier service and the DC API, which removes most session handling. Large banks and platforms running their own verifier must own key management, response endpoint isolation, fraud scoring and multiple wallet and issuer combinations.

Detection and measurement

  • Nonce and state anomalies: responses with unknown, expired or reused nonce or state values. Target zero accepted; investigate every rejection cluster.
  • Audience mismatches: KB-JWT aud not equal to your client identifier or origin, which signals relay or phishing.
  • Cross-device completion geography: QR sessions started in one network or country and completed from a distant device, a common sign of relayed codes.
  • Request-to-completion time: sessions completed long after the QR was shown, or polled heavily before completion.
  • Verification failure rate by issuer and wallet: a step change usually means an issuer key rotation or a broken wallet release.
  • Claims requested versus used: each DCQL claim should map to a documented purpose.

Log the flow identifiers, outcome and failure reason without logging claim values. These map to NIST CSF 2.0 DE.CM-03 monitoring of technology usage.

Framework mapping

FrameworkReferenceHow OpenID4VP relates
NIST CSF 2.0PR.AA-03Authenticating users from wallet credentials
NIST CSF 2.0PR.DS-02Encrypted responses and TLS protect data in transit
NIST SP 800-53 Rev. 5IA-8Identification and authentication of non-organisational users such as customers
NIST SP 800-53 Rev. 5SC-23Session authenticity: nonce, state and Response Code binding
NIST SP 800-53 Rev. 5SC-8Transmission confidentiality and integrity
OWASP ASVS 5.0V9.1.1, V9.2.3Signature validation and audience restriction of presented tokens

Common failure patterns

  • Accepting the wrong audience: verifiers that check the nonce but not the KB-JWT aud, or compare only the part after the prefix, accept presentations made for another verifier.
  • Trusting wallet-side filtering: assuming that because the DCQL asked for a PID from a trusted issuer, whatever comes back is one. The specification says the verifier must check.
  • Unprotected response endpoint: a response_uri whose internal lookup can be queried by guessing a transaction id leaks presentations full of personal data.
  • Long-lived QR codes: request URIs valid for many minutes give attackers time to relay them into phishing lures.
  • Following HTTP redirects: wallets should not follow 3xx responses on request_uri or response_uri; verifiers that rely on redirects there break interop and can leak data to unvalidated hosts.
  • Using a user-chosen claim as a login key: matching returning users on an email address in a credential without the issuer identifier lets anyone with a credential from a different issuer claim the account. See the Digital Identity Wallet Fraud Risks Guide.

Practitioner checklist

  • Adopt OpenID4VP 1.0 with a named profile (HAIP 1.0 for high assurance) and record the versions of dependent drafts it pins.
  • Sign all requests, use x509_hash or your framework's prefix, and keep signing keys in an HSM.
  • Generate a fresh, unpredictable nonce and state per transaction and expire them within minutes.
  • Verify KB-JWT nonce and full-string aud (or origin: value) on every presentation.
  • Require encrypted responses (direct_post.jwt or dc_api.jwt) when personal data is returned.
  • Implement the Response Code pattern for same-device direct_post and short request lifetimes for QR flows.
  • Prefer the Digital Credentials API where available, with expected_origins in signed requests.
  • Validate issuer trust, status and every DCQL constraint on the verifier side.
  • Request only claims tied to a documented purpose and your registration, and do not store raw presentations by default.
  • Pass the OpenID Foundation conformance tests before production and after every library upgrade.

Standards and references

Related NHI Mgmt Group resources: Verifiable Credentials Guide · SD-JWT and SD-JWT VC Guide · OpenID for Verifiable Credential Issuance Guide · eIDAS 2.0 and the European Digital Identity Framework Guide · OAuth 2.0 and OpenID Connect Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.