Overview
VCVerifier supports three different modes for transmitting authentication requests to wallets, following the RFC9101 standard for request objects. Each mode has different use cases, security characteristics, and wallet compatibility. The three request modes are:urlEncoded
Parameters passed directly in the URL
byValue
Signed JWT request object embedded in URL
byReference
Reference to a JWT request object hosted by verifier
Configuration
Enable and configure request modes in yourserver.yaml:
The
clientIdentification configuration is required for byValue and byReference modes, as these modes sign the request object as a JWT.Mode 1: urlEncoded
Description
The simplest mode where all authentication parameters are passed directly in the URL as query parameters. No signing or request object creation is involved.Example
Usage
Specifyrequest_mode=urlEncoded when initiating authentication:
Characteristics
- Advantages
- Disadvantages
- Simple - No JWT signing required
- Fast - No additional HTTP requests
- Compatible - Works with basic wallet implementations
- Transparent - All parameters visible in URL
When to Use
Use
urlEncoded when:- Working with simple credential requests
- Testing or development environments
- Wallet doesn’t support signed requests
- No clientIdentification configured
Mode 2: byValue
Description
The request parameters are encoded as a signed JWT and embedded directly in the URL. The JWT is signed by the verifier, providing cryptographic proof of the request’s authenticity.Example
JWT Structure
The request JWT contains three parts: Header:Usage
Specifyrequest_mode=byValue when initiating authentication:
Characteristics
- Advantages
- Disadvantages
- Secure - Signed JWT prevents tampering
- Self-contained - No additional HTTP requests
- Verifiable - Wallet can verify verifier’s identity
- Standards compliant - Follows RFC9101
When to Use
Use
byValue when:- Need cryptographic request integrity
- Wallet supports JWT request objects
- Request parameters fit in URL
- Want self-contained authentication flow
Mode 3: byReference (Recommended)
Description
Instead of embedding the JWT in the URL, a reference (URL) to the JWT is provided. The wallet retrieves the request object by making an HTTP request to the verifier. This is the recommended mode for production as it keeps QR codes small while maintaining security through signed JWTs.Example
Usage
Specifyrequest_mode=byReference (or omit as it’s often the default):
Request Object Endpoint
The request object is available at/api/v1/request/{state}:
Characteristics
- Advantages
- Disadvantages
- Small QR codes - Only contains reference URL
- Secure - Signed JWT prevents tampering
- Scalable - Works with complex presentation definitions
- Best practice - Recommended by standards
- Easy scanning - Smaller QR codes scan faster
When to Use
Use
byReference when:- Production deployments
- Complex credential requests
- QR code size is a concern
- Security is a priority
- Wallet supports request_uri
Comparison Matrix
| Feature | urlEncoded | byValue | byReference |
|---|---|---|---|
| QR Code Size | Medium | Large | Small |
| Security | Basic | High | High |
| Request Integrity | No | Yes | Yes |
| Additional HTTP Calls | 0 | 0 | 1 |
| Configuration Required | No | Yes | Yes |
| Complex Requests | Limited | Limited | Yes |
| Wallet Compatibility | Universal | Good | Good |
| Production Recommended | No | Maybe | Yes |
Client Identification Setup
ForbyValue and byReference modes, you need to configure client identification:
Using DID
Using x509 (san_dns)
Generating Keys
Dynamic Request Mode Selection
You can allow clients to specify the request mode dynamically:Wallet Compatibility
Different wallets have varying support for request modes:- Modern Wallets
- Standard Wallets
- Basic Wallets
Support all modes
- EBSI Wallet
- Walt.ID Wallet
- Sphereon Wallet
byReferenceTesting Different Modes
Test each request mode to ensure wallet compatibility:Best Practices
Production Deployments
Production Deployments
- Use
byReferenceas the default mode - Configure
clientIdentificationproperly - Use strong signing algorithms (ES256 or RS256)
- Monitor request object endpoint availability
Development & Testing
Development & Testing
- Start with
urlEncodedfor simplicity - Test all three modes with your target wallet
- Verify JWT signature verification works
- Check QR code scanning performance
Wallet Compatibility
Wallet Compatibility
- Detect wallet capabilities if possible
- Provide fallback to
urlEncoded - Document supported modes for integrators
- Test with multiple wallet implementations
Security
Security
- Always use HTTPS in production
- Rotate signing keys regularly
- Set appropriate JWT expiration times
- Validate request_uri domains
Troubleshooting
JWT Signature Verification Failed
Issue: Wallet cannot verify the JWT signature. Solutions:- Verify
clientIdentification.idmatches the signing key - Check the signing algorithm matches the key type
- Ensure the public key is accessible to the wallet
- Validate certificate chain for x509_san_dns
Request Object Not Found
Issue: Wallet gets 404 when fetching request_uri. Solutions:- Verify the request object endpoint is accessible
- Check session hasn’t expired
- Ensure state parameter is correct
- Verify firewall rules allow wallet access
QR Code Too Large
Issue: QR code is too large to scan reliably. Solutions:- Switch from
byValuetobyReference - Reduce presentation definition complexity
- Use shorter URLs (custom domain)
- Test with different QR code error correction levels
Mode Not Supported
Issue: Selected mode is not insupportedModes configuration.
Solutions:
- Add the mode to
verifier.supportedModesarray - Configure
clientIdentificationfor signed modes - Restart VCVerifier after configuration change
- Verify configuration file syntax
Next Steps
Configuration
Complete configuration guide for VCVerifier
Frontend Integration
Implement frontend authentication flows
Same-Device Flow
Learn about same-device authentication
Security
Security best practices and considerations