Skip to content

Configuring Presentation Flows

Presentation flow files define what credentials should be requested from the user and which claims must be disclosed. These files are placed in:

config/presentation/{id}.json

Each file corresponds to a specific presentation scenario and uses DCQL to define the query. Files are not cached and are loaded dynamically at runtime. The id is used to reference the presentation configuration in the API.


Credential Presentation Flow

This flow describes how a backend service requests a credential presentation (e.g., to authorize a user or verify an attribute). EUDIPLO creates the OID4VP request and handles the protocol flow with the wallet.

EUDI_WalletMiddlewareEnd_ServiceEUDI_WalletEUDI_WalletMiddlewareMiddlewareEnd_ServiceEnd_ServiceRequest OID4VP presentation requestReturn presentation request linkPresent link to userStart OID4VP flowOID4VP presentation exchangeSend presented data

Credential Presentation During Issuance

This flow describes an advanced scenario where the end-user is required to present a credential during the issuance of another credential. This is useful when a prior attribute (e.g. student ID, PID) is needed to qualify for the new credential.

EUDI_WalletMiddlewareEnd_ServiceEUDI_WalletEUDI_WalletMiddlewareMiddlewareEnd_ServiceEnd_ServiceRequest OID4VCI offer generationReturn offer linkPresent offer link to userStart OID4VCI flowRequest credential presentationPresent credentialSend presented credentialProvide data for issuanceOID4VCI credential issuanceNotify successful issuance

Example Presentation Request

{
    "dcql_query": {
        "credentials": [
            {
                "id": "pid",
                "format": "dc+sd-jwt",
                "meta": {
                    "vct_values": ["<PUBLIC_URL>/credentials/vct/pid"]
                },
                "claims": [
                    {
                        "path": ["address", "locality"]
                    }
                ]
            }
        ]
    },
    "registrationCert": {
        "body": {
            "privacy_policy": "https://example.com/privacy-policy",
            "purpose": [
                {
                    "locale": "en-US",
                    "name": "To register a new user"
                }
            ],
            "contact": {
                "website": "https://example.com/contact",
                "e-mail": "privacy@example.com",
                "phone": "+1234567890"
            },
            "credentials": [
                {
                    "format": "dc+sd-jwt",
                    "meta": {
                        "vct_values": ["<PUBLIC_URL>/credentials/vct/pid"]
                    },
                    "claims": [
                        {
                            "path": ["address", "locality"]
                        }
                    ]
                }
            ]
        },
        "id": "ea140773-5f7f-4e39-a21c-d2a5f912deb2"
    },
    "webhook": "http://localhost:3001/consume"
}

Field Breakdown

  • dcql_query: REQUIRED: Digital Credentials Query Language Defines the credentials and claims to be requested.
  • registrationCert: REQUIRED: Contains the legal purpose and contact information for processing personal data aligned with the Blueprint
  • webhook: OPTIONAL: The URL where the verified presentation will be sent after the user completes the flow, for more information, see Webhook Integration. If not provided, the data can be fetched via the session ID returned in the initial request.

🔧 <PUBLIC_URL> is replaced automatically at runtime based on your configured PUBLIC_URL value.


How to Test

  1. Place your file in config/presentations/
  2. Check it is loaded via GET /presentations
  3. Trigger the presentation request vis /oid4vp like
curl -X 'POST' \
  'http://localhost:3000/oid4vp' \
  -H 'accept: application/json' \
  -H 'x-api-key: 1234' \
  -H 'Content-Type: application/json' \
  -d '{
  "response_type": "qrcode",
  "requestId": "pid",
  "webhook": "http://localhost:3001/consume",
}'