Protocols
BaseID implements four credential exchange protocols, covering both OpenID-based and DIDComm-based ecosystems.
Protocol overview
Section titled “Protocol overview”| Protocol | Purpose | Flow | Standard |
|---|---|---|---|
| OID4VCI | Credential issuance | Issuer → Wallet | OpenID Foundation |
| OID4VP | Credential presentation | Wallet → Verifier | OpenID Foundation |
| SIOPv2 | Self-issued authentication | User → Relying Party | OpenID Foundation |
| DIDComm v2 | Peer-to-peer messaging | Any → Any | DIF / Aries |
OID4VCI — OpenID for Verifiable Credential Issuance
Section titled “OID4VCI — OpenID for Verifiable Credential Issuance”Enables a wallet to receive credentials from an issuer using OAuth 2.0 flows.
1. Issuer creates credential offer (pre-authorized code) ↓2. Wallet scans QR code / opens deep link ↓3. Wallet exchanges pre-auth code for access token POST /token → { access_token, c_nonce } ↓4. Wallet requests credential with proof of possession POST /credential → { credential: "eyJ..." } ↓5. Wallet stores credentialKey concepts
Section titled “Key concepts”| Concept | Description |
|---|---|
| Credential Offer | URI containing issuer metadata and pre-authorized code |
| Pre-authorized Code | One-time code granting access to a specific credential |
| c_nonce | Server-generated nonce for proof of possession |
| Proof of Possession | JWT proving the wallet controls the holder DID |
| Credential Configuration | Describes available credential types |
BaseID implementation
Section titled “BaseID implementation”baseid-oid4vcicrate (62 tests)- Cloud: issuer metadata at
/.well-known/openid-credential-issuer
OID4VP — OpenID for Verifiable Presentations
Section titled “OID4VP — OpenID for Verifiable Presentations”Enables a verifier to request and receive credential presentations.
1. Verifier creates presentation request ↓2. Wallet receives request (QR, deep link, redirect) ↓3. Wallet matches credentials against presentation definition ↓4. Wallet creates VP token (selective disclosure if SD-JWT) ↓5. Wallet submits via direct_post ↓6. Verifier validates and extracts claimsKey concepts
Section titled “Key concepts”| Concept | Description |
|---|---|
| Presentation Definition | What credentials the verifier accepts |
| DCQL | Digital Credentials Query Language — alternative query format |
| VP Token | Verifiable presentation with disclosed credentials |
| direct_post | Wallet POSTs directly to verifier callback |
BaseID implementation
Section titled “BaseID implementation”baseid-oid4vpcrate (64 tests)
DIDComm v2 — Peer-to-peer messaging
Section titled “DIDComm v2 — Peer-to-peer messaging”DID-based messaging where parties communicate directly using their DIDs.
When to use DIDComm vs REST
Section titled “When to use DIDComm vs REST”| Scenario | DIDComm | REST API |
|---|---|---|
| Aries/ACA-Py wallet | Yes | No |
| Server-to-server | No | Yes |
| Multi-step protocol tracking | Yes (threads) | Manual |
| Offline/async messaging | Yes | No |
Supported protocols
Section titled “Supported protocols”| Protocol | Messages |
|---|---|
| Trust Ping 2.0 | ping → ping-response |
| Issue Credential 3.0 | offer → request → issue |
| Present Proof 3.0 | request → presentation |
BaseID implementation
Section titled “BaseID implementation”baseid-didcommcrate (32 tests)- Cloud: DIDComm API
SIOPv2 — Self-Issued OpenID Provider
Section titled “SIOPv2 — Self-Issued OpenID Provider”Passwordless authentication using DIDs.
1. Relying Party creates auth request2. User's wallet acts as OpenID Provider3. Wallet creates ID Token signed with user's DID4. Relying Party verifies DID signature → user authenticatedBaseID implementation
Section titled “BaseID implementation”baseid-siopcrate (43 tests)
Protocol selection guide
Section titled “Protocol selection guide”Issuing a credential? → OID4VCIRequesting credentials? → OID4VP (web) or DIDComm (Aries wallet)Authenticating a user with DID? → SIOPv2Peer-to-peer messaging? → DIDComm v2Simple server-to-server? → Cloud REST APISee also
Section titled “See also”- Cloud: DIDComm API — DIDComm via REST
- Credential Formats — formats used by each protocol
- DIDs — DID resolution used by all protocols