Introduction
The VCVerifier API provides endpoints for implementing SIOP-2 and OIDC4VP compliant authentication flows. It exchanges Verifiable Credentials for JWT tokens that can be used for authorization and authentication in downstream components.VCVerifier acts as a Relying Party in the SIOP-2 specification, verifying credentials and issuing JWT tokens for authenticated sessions.
Base URL
The API is served on port 8080 by default. For production deployments:API Endpoints
Frontend Endpoints
Endpoints for browser-based H2M interactions with QR code flows
API Endpoints
RESTful endpoints for M2M integrations and programmatic access
OpenID Configuration
Standard OpenID Connect discovery and configuration endpoints
Token Exchange
OAuth 2.0 compliant token endpoints for retrieving JWTs
Authentication Overview
VCVerifier uses a multi-step authentication flow:- Initiation: Client starts the flow via authorization or login endpoints
- Presentation: User presents Verifiable Credentials via wallet
- Verification: VCVerifier validates credentials against trusted registries
- Token Issuance: JWT access token is generated with credential claims
Frontend Endpoints
These endpoints are designed for human-to-machine (H2M) interactions.Login with QR Code (v1)
GET/api/v1/loginQR
Presents a rendered HTML page with a QR code for initiating the SIOP flow.
Parameters:
Session state identifier (UUID format recommended)Example:
274e7465-cc9d-4cad-b75f-190db927e56aEndpoint to receive the authentication callback with state and codeExample:
https://my-portal.com/auth_callbackService identifier for retrieving scope and trust configurationExample:
packet-delivery-portalCryptographic nonce for replay protectionExample:
274e7465-cc9d-4cad-b75f-190db927e56aMode for authorization request encodingOptions:
urlEncoded, byValue, byReferenceRendered HTML page containing the QR code for wallet scanning
Invalid request parameters
Login with QR Code (v2)
GET/api/v2/loginQR
Enhanced version with additional parameters for more flexible authentication flows.
Parameters:
Includes all v1 parameters plus:
Custom redirect URI for the authentication responseExample:
https://my-app.com/redirectURI for retrieving a request object (JWT)Example:
https://my-app.com/request.jwtOpenID Connect scope for credential typesExample:
openidAPI Endpoints
These endpoints are designed for programmatic access and machine-to-machine (M2M) integrations.Authorization Endpoint
GET/api/v1/authorization
OAuth 2.0 compliant authorization endpoint providing redirect to the concrete authorization method.
Parameters:
Session state identifier
Client application identifier
Callback URI for authorization response
URI reference to a request object containing authorization parameters
Requested credential types/scopes
Cryptographic nonce value
Type of expected responseOptions:
codeRedirect to the authorization entry point with encoded parameters
Start SIOP Flow
GET/api/v1/startsiop
Initiates the SIOP flow and returns the OpenID connection string.
Parameters:
Session state identifier
Endpoint to receive the JWT token
Service identifier for configuration retrieval
OpenID connection string for wallet interaction
Same Device Flow
GET/api/v1/samedevice
Starts the SIOP flow for credentials held by the same device (no QR code needed).
Parameters:
Session state identifier
Client application identifier
Requested credential scopes
Authorization request mode
Custom redirect path (defaults to oid4vp deeplink)Example:
/Redirect to authentication response path with authorization parameters
Request Object by Reference
GET/api/v1/request/{id}
Returns a JWT-encoded request object by reference as defined in OpenID4VP Section 5.
Path Parameters:
Request identifier (typically UUID)Example:
urn:uuid:274e7465-cc9d-4cad-b75f-190db927e56aJWT-encoded request object containing authorization parameters
Invalid request ID or expired request
Authentication Response (POST)
POST/api/v1/authentication_response
Receives and stores the Verifiable Presentation from the wallet.
Parameters:
Session state identifier
Client application identifier
Base64URL-encoded Verifiable Presentation containing credential(s)
Base64URL-encoded Presentation Submission describing the presented credentials
Both
vp_token and presentation_submission must use Base64-URL-Safe encoding (RFC 4648 Section 5), not standard Base64 encoding.Credential successfully verified and stored
Invalid presentation or verification failure
Authentication Response (GET)
GET/api/v1/authentication_response
Alternative method for receiving authentication responses via query parameters.
Parameters:
Session state identifier
Base64URL-encoded Verifiable Presentation
Base64URL-encoded Presentation Submission
Credential successfully verified and stored
Token Exchange
Token Endpoint
POST/token
OAuth 2.0 compliant token endpoint for exchanging authorization codes for JWT access tokens.
Request Body (application/x-www-form-urlencoded):
OAuth 2.0 grant typeOptions:
authorization_code, urn:ietf:params:oauth:grant-type:token-exchangeAuthorization code from the authentication responseExample:
myRandomStringSame URI as provided in the original requestExample:
https://my-portal.com/auth_callbackTarget service URI where the token will be used
Logical name of the target service
Space-delimited list of desired scopes
Type of security token requestedOptions:
urn:ietf:params:oauth:token-type:access_tokenSecurity token representing the party’s identity
Type of the subject tokenOptions:
urn:eu:oidf:vp_tokenJWT access token and metadata
Invalid or expired authorization code
Service-Specific Token Endpoint
POST/services/{service_id}/token
Token endpoint scoped to a specific service configuration.
Path Parameters:
Service identifier matching the configurationExample:
packet-delivery-portalOpenID Configuration
JWKS Endpoint
GET/.well-known/jwks
Provides the public keys for verifying JWT signatures issued by the verifier.
Responses:
JWK Set containing public keys
OpenID Provider Metadata
GET/services/{service_id}/.well-known/openid-configuration
Returns OpenID Provider configuration for a specific service.
Path Parameters:
Service identifier
OpenID Provider Metadata
Common Response Formats
Error Response
All error responses follow a consistent format:- Missing Input: Required parameter is missing
- Invalid Credential: Credential verification failed
- Expired Session: Authentication session has expired (default: 30 seconds)
- Untrusted Issuer: Credential issuer not found in trusted registries
- Invalid Code: Authorization code is invalid or expired
Error Codes
| Status Code | Description | Common Causes |
|---|---|---|
| 200 | Success | Request completed successfully |
| 204 | No Content | Credential stored successfully |
| 302 | Redirect | Standard flow redirect |
| 400 | Bad Request | Missing parameters, invalid format, validation failure |
| 403 | Forbidden | Invalid authorization code, untrusted issuer |
| 404 | Not Found | Request object or session not found |
| 500 | Internal Server Error | Server-side processing error |
Request Modes
VCVerifier supports three modes for encoding authorization requests:URL Encoded
Parameters are passed directly in the URL:By Value
Parameters are encoded in a signed JWT passed as therequest parameter:
Requires proper
clientIdentification configuration with signing keys.By Reference (Recommended)
A reference URI is provided to retrieve the request object:Rate Limiting
Currently, VCVerifier does not implement rate limiting. For production deployments, consider implementing rate limiting at the reverse proxy or API gateway level.Security Considerations
Next Steps
Authentication Flow
Detailed authentication flow with sequence diagrams
Configuration
Learn how to configure VCVerifier for your use case