Skip to content

Application-delegated flow

sequenceDiagram
    participant Wallet
    participant Application
    participant Document Rails
    Application-->>Document Rails: Presentation initialization
    Document Rails-->>Application: OID4VP URL, signed presentation request
    Note over Application: The URL is converted to the QR code
    Application->>Wallet: QR code is displayed to the user
    Note over Wallet: User scans the QR code
    Wallet->>Application: Wallet requests the signed presentation request
    Application->>Wallet: Signed presentation request
    Note over Wallet: User decides what to share
    Wallet->>Application: OID4VP presentation response
    Application-->>Document Rails: OID4VP presentation response
    Document Rails-->>Application: Verification status
  1. Your application initializes the OID4VP verification session and receives the encoded OID4VP presentation request and the invitation URL.

  2. Your application converts the URL to the QR code and displays it to the user.

  3. User scans the QR code using their credential wallet. In the background, their wallet fetches the information about the presentation request.

  4. User decides which credentials to share with your application.

  5. Wallet encodes selected credentials and sends them to your application.

  6. Your application finalizes the OID4VP presentation flow, receiving decoded credential information or an error if the provided credentials were invalid.

Integration

To allow the communication between the wallet and Document Rails, your application has to provide two publicly available routes that will be used to relay information from the holder to the OID4VP API.

Your application doesn't have to implement the protocol itself, as it is handled by Document Rails.

For examples of how to integrate Document Rails OID4VP support into your application, you can follow these examples