Skip to content
Wallet and Entity Collection draft updates
Documentation menu

16.12. Verify an alternative Wallet Attestation format

Feature guides / 16. Wallet workflows · Example context

Driving Licence Federation chooses an attestation format other than the built-in JWT representation. Licensing Authority still needs Wallet Provider's federation identity and trusted key material for its format implementation.

How to use it

verifyProviderAttestation() discovers the provider, resolves available protocol keys, and invokes verifyAttestation. It then rechecks evidence lifetime and cancellation before returning the trusted provider.

import type { CryptoEngine } from "@oidfed/crypto";
import { CredentialIssuerRole, type AttestationVerificationOptions } from "@oidfed/wallet";
import type { TrustAnchorSet } from "@oidfed/core";

export async function verifyAlternative(
  engine: CryptoEngine,
  artifact: unknown, anchors: TrustAnchorSet,
  verifyAttestation: AttestationVerificationOptions["verifyAttestation"],
) {
  return CredentialIssuerRole.verifyProviderAttestation(artifact,
    "https://wallet-provider.example", anchors, { engine, verifyAttestation });
}

What your application owns

Supply the full verification for that format and the framework's acceptance rules. A callback is an integration point, not evidence that the library natively implements every attestation standard. Do not equate provider discovery with artifact verification or silently accept an unknown format when the intended callback is absent. Preserve cancellation through expensive host operations.

Define the alternative format contract

A deployment that accepts an alternative Wallet Attestation format supplies a verifier with a clear result contract and trusted provider context. Agree which format the callback understands, how it binds an instance key, and how its validity is represented before enabling it.

Treat a callback exception, timeout, or negative result as failed verification. Do not use the callback as permission to bypass provider trust or accept an unrecognized artifact. The host owns format-specific parsing and proof verification; federation evidence still constrains the participant on whose statement the application relies.

Connect format-specific verification

CredentialVerifierRole.verifyCredential(credential, issuerId, trustAnchors, options) validates issuer trust, resolves applicable published keys, then invokes the required verifyCredential callback. The callback receives the credential, trusted issuer evidence, available protocol keys, and a cancellation signal. It must verify the format, cryptographic bindings, status, and applicable framework policy. Without a published key representation, keys is undefined and the configured verifier must use another trusted verification method or reject the credential, consistent with Wallet Draft 05 §4.

CredentialIssuerRole.verifyProviderAttestation and CredentialVerifierRole.verifyProviderAttestation support other attestation formats through a required verifyAttestation callback. They validate provider trust and resolve protocol keys from effective provider metadata before calling it. The supported representations are jwks, jwks_uri, and signed_jwks_uri. Missing keys or a resolution failure returns an error without invoking the callback. Provider discovery remains available without published protocol keys.

The callback receives the attestation, trusted provider evidence, a required keys JWK Set, and a cancellation signal. It must cryptographically verify the attestation using those keys and apply its format and framework checks before returning true. Wallet Draft 05 §8.5 requires verification using cryptographic material provided by the federation Trust Chain; the key representations above are oidfed's supported mechanism. The application implements the format-specific verification. These helpers establish Wallet Provider trust; a Verifier Instance attestation profile under Wallet §8.1 needs its own issuer, format, and validation rules.

For both credential and attestation callbacks, missing callbacks, rejection, exceptions, timeout, and cancellation prevent acceptance. Callback inputs are detached copies, and issuer/provider trust evidence must remain unexpired when verification finishes.

VCI protocol endpoints and optional signed issuer metadata/proofs retain their own processing rules. In particular, a VCI JWT proof using trust_chain for signature verification requires kid, unlike a generic attestation PoP JWT. Passing federation validation does not establish that a presentation, proof, or credential is valid.

Offline validation depends on the age of the supplied evidence. It does not prove current non-revocation after that evidence was issued. Frameworks choose chain lifetimes and revalidation schedules; the draft's 24-hour example is not a fixed library limit.

Next: 16.13. Use supplied evidence in an offline wallet flow

View source on GitHub