<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "IdentityDocumentServicesUI",
  "identifier" : "/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "IdentityDocumentServicesUI"
    ],
    "preciseIdentifier" : "s:26IdentityDocumentServicesUI26OpenID4VPRawRequestContextV"
  },
  "title" : "OpenID4VPRawRequestContext"
}
-->

# OpenID4VPRawRequestContext

A context that contains an incoming OpenID4VP request.

```
struct OpenID4VPRawRequestContext
```

## Overview

OpenID for Verifiable Presentations (OpenID4VP) is a protocol that relying parties use to request credentials. The system provides this context to the closure you pass to [`init(content:)`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestScene/init(content:)). A *relying party* is the website, app, or service that asks to see that information and then relies on it to make a decision, such as confirming a person’s age or identity. Read the request from [`requestData`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/requestData), using [`exchangeProtocol`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/exchangeProtocol) to determine how to decode the data, and present the request to the person using your app. To release credentials, call [`sendResponse(_:)`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/sendResponse(_:)) with an [`OpenID4VPRawRequestContext.Response`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/Response). To decline, call [`cancel()`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/cancel()).

## Topics

### Reading the request

[`let requestData: Data`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/requestData)

Incoming request data that uses encoding the exchange protocol defines.

[`let exchangeProtocol: OpenID4VPExchangeProtocolIdentifier`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/exchangeProtocol)

The protocol identifier that determines the format of the request and response data.

[`let requestingWebsiteOrigin: URL?`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/requestingWebsiteOrigin)

The origin of the requesting website, if present.

### Responding to the request

[`func sendResponse(OpenID4VPRawRequestContext.Response)`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/sendResponse(_:))

Sends an OpenID4VP response to the relying party.

[`struct Response`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/Response)

An OpenID4VP response to send to the relying party.

[`func cancel()`](/documentation/IdentityDocumentServicesUI/OpenID4VPRawRequestContext/cancel())

Cancels the current request from the relying party.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)