Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

Presenting from a wallet (OpenID4VP)

Northwind's project workspace asks Riley to prove the course with their wallet. This lesson follows that exchange with OpenID4VP: how the verifier asks for exactly the evidence it needs, how the response is bound to this one request, what the evidence does and does not establish, and how each kind of refusal should be handled.

A request for evidence in this transaction

On 16 October, Riley opens Northwind's project workspace on their laptop for the first time. Instead of a sign-up form, the page shows a QR code and a line of text: Northwind needs to confirm you have completed the data-handling course. Riley scans the code with their phone, and their wallet takes over.

What happens next follows OpenID for Verifiable Presentations (OpenID4VP). It borrows the shape of an OAuth authorization request, with Northwind's verifier in the role of the client and Riley's wallet in the role that would normally be played by an authorization server. The verifier says what it wants, and the wallet answers with a presentation instead of a code or token. OpenID4VP carries the request and the response; the credential format, here the SD-JWT from Selective disclosure with SD-JWT, still defines how the evidence inside is protected and checked.

The QR code holds very little: Northwind's client identifier and a request_uri from which the wallet fetches the full request. That request comes back as a signed JWT. Northwind's client identifier, x509_san_dns:verifier.northwind.example, tells the wallet how to authenticate it: the request must be signed with a certificate issued for the DNS name verifier.northwind.example, from a certificate authority the wallet trusts. The wallet checks that signature, and checks that the address the response will go to sits on the same name. Only then does it show Riley who is asking.

{
  "client_id": "x509_san_dns:verifier.northwind.example",
  "response_type": "vp_token",
  "response_mode": "direct_post",
  "response_uri": "https://verifier.northwind.example/response",
  "nonce": "Zf_4b7lKBqU3rsSa",
  "state": "TVYlKPxixFdM7ud8SnRcyw",
  "dcql_query": {
    "credentials": [
      {
        "id": "course_credential",
        "format": "dc+sd-jwt",
        "meta": {
          "vct_values": ["https://credentials.cedar.example/course-completion"]
        },
        "claims": [
          { "path": ["course"] },
          { "path": ["result"] }
        ]
      }
    ]
  }
}

response_type=vp_token asks for a presentation. response_mode=direct_post tells the wallet to send its answer straight to response_uri with an HTTP POST, rather than back through the laptop's browser, which suits a request that started on another device. The nonce is a fresh random value for this request alone, and state lets Northwind find this request again when the answer arrives.

The dcql_query is the request's shopping list, written in the Digital Credentials Query Language (DCQL). It asks for one credential, an SD-JWT of Cedar's course-completion type, and within it only the course and result claims. Riley's wallet finds their credential, and shows them that Northwind's verifier is asking for those two claims. Their email stays behind, because nobody asked for it.

Notice what the wallet relied on to name the requester: a signature it could check against a certificate it trusts. A familiar logo on the laptop screen, or a QR code that arrived in an unexpected email, establishes nothing on its own.

Bind the response to the request

Riley approves, and the wallet builds a presentation: the issuer-signed JWT, the course and result disclosures, and a Key Binding JWT whose aud is Northwind's client identifier and whose nonce is the one from this request. It posts the result to the response URI.

POST /response HTTP/1.1
Host: verifier.northwind.example
Content-Type: application/x-www-form-urlencoded

vp_token=...&state=TVYlKPxixFdM7ud8SnRcyw

vp_token, decoded:
{
  "course_credential": [
    "eyJhbGciOiJFUzI1NiIsInR5cCI6ImRjK3NkLWp3...~WyIyR0xD...~WyJpVkdq...~eyJhbGciOiJFUzI1NiIsInR5cCI6ImtiK2p3dCJ9..."
  ]
}

The vp_token is keyed by the id from the query, so Northwind knows which requested credential each presentation answers. Northwind uses state to look up the transaction it started, and from that transaction it knows the nonce it sent. Then it compares.

A week earlier, a copy of a presentation Riley made for a previous Northwind pilot ended up in a debugging log. Suppose that copy is sent to the response URI now, along with one Riley made for an unrelated verifier. All three presentations carry a valid Cedar credential and correct disclosures. Only the Key Binding JWT tells them apart:

Illustrative Key Binding JWT checks for Northwind's request with nonce Zf_4b7lKBqU3rsSa
PresentationaudnonceOutcome
Made for this request, 16 Octoberx509_san_dns:verifier.northwind.exampleZf_4b7lKBqU3rsSaAccepted, if the remaining checks pass
Copied from the 9 October pilotx509_san_dns:verifier.northwind.examplepwgguAFYfNEy26AWRefused: the nonce belongs to an earlier request
Made for another verifierx509_san_dns:verify.other.exampleThat verifier's nonceRefused: the audience is another verifier

The old presentation is the instructive one. Its credential is genuine, its disclosures match, its holder signature verifies, and it was even made for Northwind. It still does not answer today's request, because it was made for a different one. A verifier that checks everything except the nonce will accept anything that ever passed through its logs.

The answer is also not an ID token, even though the request looked like OAuth. An ID token says that an identity provider authenticated someone for a client. A vp_token carries credentials issued by someone else, presented by a holder, and Northwind validates it under the rules of its credential format. Three different keys are involved, and each has its own source. Cedar's signing key comes from Cedar's metadata, Riley's holder key from the cnf claim Cedar signed, and Northwind's own key from its certificate. A key that arrives in the response cannot become a trusted issuer key because the presenter supplied it.

Decide what the evidence establishes

With the Key Binding JWT confirmed, Northwind makes the checks from Issuers, holders, and verifiers. Cedar's signature verifies with a key from Cedar's metadata, and Cedar is an accepted issuer for this credential type. The credential is within its validity period, and its entry on Cedar's status list is not revoked. The disclosures match their digests, and the holder signature comes from the cnf key. Both required claims are present: course is cedar-basic and result is passed.

Only now does Northwind ask its own question, whether this meets the project prerequisite, and the answer is yes. If a required claim had been missing, the answer would have been an explicit no, or an offer of another way to show the course, never a permission inferred from the fact that a response arrived.

The answer covers the prerequisite and nothing else. Riley can now be added to the project, but whether they can open the workspace, edit its documents, or administer it is Northwind's ordinary authorization decision, based on the role it gives them. Riley meets the course requirement and has no administrator role, so an administrator action is still refused.

Northwind records the outcome: prerequisite met for Riley, by a Cedar course credential, in transaction TVYlKPxixFdM7ud8SnRcyw on 16 October. It does not keep the presentation itself. The pilot's copy in a debugging log shows what a kept presentation becomes.

A useful refusal explains the boundary

Not every exchange ends with a presentation, and the ways it can fail need different responses from Northwind.

Illustrative outcomes without an accepted presentation
What happenedWhat Northwind seesA sensible next step
Riley declined to shareAn error response, access_deniedRespect it, and mention any other way to meet the prerequisite
The wallet had no suitable credentialUsually the same access_deniedOffer another way to meet the prerequisite
The exchange broke downNo response before the request expiredStart a fresh request with a new nonce
A response failed a checkA presentation that did not validateRefuse, and say which check failed in terms Riley can act on

The first two rows look the same on purpose. A wallet need not tell a verifier whether the person refused or simply had nothing to show, because that difference is itself information about the person. Northwind's page should therefore work for both: no pressure to try again and share after all, and a clear route for someone who has not taken the course. A transport failure is different, since nothing was decided, and a new request is the honest fix.

The cross-device design that made Riley's experience easy also changes the risks. The QR code connects their wallet to whatever session displayed it, and their phone cannot see the laptop. An attacker running a convincing copy of Northwind's workspace could show Northwind's genuine QR code on their own page. Riley's wallet would correctly name Northwind as the verifier, and their presentation would complete a session that belongs to the attacker. Wallets reduce this by making the requester and purpose prominent, and people reduce it by sharing only from flows they started themselves.

When the wallet and the browser are on the same phone, Northwind can close the gap. After receiving the direct post, its response endpoint returns a redirect_uri carrying a one-time response_code. The wallet opens it in the browser, and Northwind accepts the result only if that code arrives in the same browser session that started the request. Which mechanisms a given wallet and verifier support depends on the profile they have agreed on, so Northwind tests the combinations it accepts rather than assuming every wallet behaves alike.

Browsers now offer a cleaner same-device path that removes the QR code altogether: the Digital Credentials API. Instead of displaying a code, Northwind's page calls the browser, which asks the operating system which wallets can answer and returns the chosen wallet's response. Because the request now comes from a web page, the wallet names the requester by its web origin rather than by a scanned code, and the response is bound to that origin. That closes the copied-QR-code gap for the same-device case, since an attacker's page cannot make the wallet bind a presentation to Northwind's origin. The cross-device QR flow remains for the case where the wallet is on a different device, and OpenID4VP carries the presentation over either path.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

A copy of Riley's presentation from a 9 October exchange is sent to Northwind's response URI today. Its credential, disclosures and holder signature are all valid. Why should Northwind refuse it? 1 of 3

Choose one answer.

Northwind's verifier receives access_denied from Riley's wallet. What is the sensible response? 2 of 3

Choose one answer.

Northwind's DCQL query asks for course and result. A wallet answers with a genuine, correctly bound presentation that discloses only the course. What should Northwind decide? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity