16. Wallet workflows
Maya receives a driving licence from a Licensing Authority and stores it in her wallet. Later, a Car Rental Company asks her to present the information it needs for a rental decision. The Wallet specification's four-party model connects the Holder, Credential Issuer, Credential Verifier, and Trust Anchor; its extended illustration also identifies the Wallet Provider.
Federation relationships
The example federation establishes organizational trust:
Driving Licence Federation
[Trust Anchor]
|
+--------------------+--------------------+
| | |
Licensing Authority Wallet Provider Car Rental Company
[Credential Issuer] [Wallet Provider] [Credential Verifier]
Each organization publishes its own federation metadata. The selected Trust Anchor vouches for its Immediate Subordinates; an application validates their paths before using effective metadata. An Intermediate can be added when the framework needs another level. The names and accreditation policy are illustrative configuration choices.
Credential and wallet interactions
Wallet Provider
|
supplies wallet solution
and attests the instance
|
v
Licensing Authority ------> Maya's Wallet ------> Car Rental Company
Credential Issuer Holder's instance Credential Verifier
issuance presentation
These arrows show application interactions, not federation hierarchy. Maya's wallet instance holds credentials and a proof key; it is not automatically another federation entity. The Wallet Provider's attestation describes that instance. The driving licence describes Maya's driving entitlement. A Trust Mark describes a participant's accreditation. They have different issuers and verification rules.
Use WalletProviderRole, CredentialIssuerRole, and CredentialVerifierRole for the profile's federation operations. Compose them into Leaf, TrustAnchor, or Intermediate when the organization needs a host identity. Wallet applications can use the documented static methods with their own trust configuration. The surrounding protocol engine still owns credential formats, storage, consent, transport, and presentation verification.
Example context
Meet the driving licence participants
The example Driving Licence Federation operates a Trust Anchor. The Licensing Authority issues Maya's driving licence. The Wallet Provider supplies her wallet solution and attests her wallet instance. The Car Rental Company requests a presentation and verifies it before making a rental decision.
An Accreditation Authority owns an example approved-verifier Trust Mark type. A Verifier Auditor can issue that mark under its delegation and the anchor's policy. The rental company holds the mark. These organizational roles are separate from Maya and her wallet instance.
This is an illustrative application of Wallet Draft 05's model. The names, accreditation policy, and .example addresses describe this documentation's example, not a prescribed licence scheme. Example identifiers are listed in the index.
Follow Maya's driving licence journey
The wallet discovers the Licensing Authority through approved anchors and obtains its effective metadata. Before issuing, the authority evaluates the Wallet Provider and the wallet's attestation and proof. The application's OpenID4VCI engine conducts the licence issuance exchange; the federation library supplies participant trust and policy.
Later, the rental company creates a signed presentation request. Maya's wallet prepares verifier trust, retrieves the approved Request Object through its protocol engine, and completes validation with the original preparation handle. The result provides the effective query and authenticated verifier context. The wallet's engine selects credential data, applies the required format and session checks, and obtains Maya's consent.
The rental company's verifier establishes issuer trust and passes the relevant keys and metadata to its credential-format verification callback. Its engine checks the presentation and required bindings before its application makes a rental decision. A valid federation path alone neither proves a driving entitlement nor authorizes a rental.
Work through this topic
Use federation evidence for participant trust and the protocol hooks for request and artifact verification. The host supplies consent, credential storage, format verification, and rental decisions.
- 16.1. Compose a wallet federation participant
- 16.2. Discover a trusted wallet participant
- 16.3. Discover a Credential Issuer and its authorization servers
- 16.4. Issue a Wallet Attestation
- 16.5. Verify a Wallet Attestation
- 16.6. Authenticate a wallet with attestation and proof
- 16.7. Create a signed driving licence presentation request
- 16.8. Validate a verifier’s presentation request
- 16.9. Apply effective DCQL and framework query policy
- 16.10. Approve transaction data in a presentation request
- 16.11. Verify a credential using trusted issuer context
- 16.12. Verify an alternative Wallet Attestation format
- 16.13. Use supplied evidence in an offline wallet flow
A Wallet Attestation, driving licence, and Trust Mark remain separate artifacts throughout this workflow. Apply the issuer trust and validity rules for the artifact being checked.
Wallet Federation, Draft 05
@oidfed/wallet provides wallet roles with federation support, including the effective-metadata and endpoint checks in Wallet §7.1.1. You supply the OpenID4VCI/OpenID4VP protocol engine, as described in the package guide. Wallet §10 applies those protocols' security considerations too. Federation validation does not replace their processing rules.
Wallet §4 requires Credential Verifiers to be able to verify credentials using issuer keys or another verification method. OpenID4VP §8.6 requires checks for format-specific integrity, authenticity, query matching, applicable Holder Binding, and framework policy. It gives revocation checks as a policy-dependent example. Verifiers MUST NOT rely on the Wallet to enforce their constraints under §14.9.
oidfed validates issuer trust and passes available protocol keys to the required verifyCredential callback. Your application verifies credential formats, cryptographic bindings, and any status checks required by its format or framework. Use verifyAttestation for alternative attestation formats under the format callback contracts, and acceptWallet for wallet acceptance. These are oidfed integration points. Return success only after the required verification; federation trust alone does not prove a credential or presentation valid.
The JWT Wallet Attestation format and PoP usage come from OpenID4VCI Appendix E and its referenced OAuth Attestation Client Authentication Draft 07. For header-based authentication, check that exactly one attestation field and one PoP field each contain one well-formed JWT, as required by OAuth Draft 07 §9. Pass that pair to oidfed for validation.
§12.1 describes freshness and replay defenses. oidfed defaults to a configurable 300-second PoP iat window and requires an explicit replay configuration: a store, atomic challenge consumption, or an intentional freshness-only policy. Challenge-based freshness is also available. These choices are library policies.
For presentation requests delivered by reference, your application's transport retrieves the Request Object under OpenID4VP §5.10. It must enforce the response media type and HTTP-error handling. oidfed validates the retrieved signed object through its prepare/complete API.
Your application handles session binding and the applicable defenses in §14.2 and §14.3. It also processes presentations under §8.6.
For presentations without holder binding, apply §5.3's state requirements, including its Digital Credentials API exception. The verifier generates a fresh random value, stores it with the session, and checks the returned value. A successful federation result does not replace these protocol checks. oidfed's existing creation helper checks required state presence when the active query is available; federation completion does not certify session binding.
For scope-based queries, supply oidfed's scopeQuery mapping using the alias rules in OpenID4VP §5.5. Transaction-data processing follows §5.1 and §8.4. oidfed rejects unsupported transaction data unless your verifyTransactionData callback validates it. See the presentation-request integration contract.
Wallet §8.2 says wallets SHOULD periodically reestablish trust with their providers. Your application chooses and runs that schedule.
For offline flows, §9 relates chain lifetimes to framework revocation requirements and describes validation with supplied anchor keys. The operator sets acceptable evidence lifetimes; the 24-hour example is not a fixed limit. Supply pinned keys, chains, intermediate Entity Configurations through entityConfigurations or a preloaded core cache, and protocol keys. oidfed's offline: true blocks library network calls, so callbacks must also work offline. A missing-evidence message helps identify incomplete local inputs. Successful offline validation does not prove that federation standing is still current.