6.11. Display Trust Mark information safely
Feature guides / 6. Trust Marks · Example context
Maya's wallet can show Maya which framework accredited Car Rental Company after verification succeeds.
Use authenticated information
Obtain the marks through the Wallet role's verified discovery result, then read only a verified mark's claims. The example rejects a missing or unverified accreditation before returning a label. For registration dashboards, the same principle applies to the OIDC workflow's verified chain evidence. logo_uri, ref, and localized names remain external display inputs. Display claims; Language tags; Logo URI.
import type { CryptoEngine } from "@oidfed/crypto";
import { CredentialVerifierRole } from "@oidfed/wallet";
import type { TrustAnchorSet } from "@oidfed/core";
export async function verifierLabel(engine: CryptoEngine, anchors: TrustAnchorSet) {
const result = await CredentialVerifierRole.discover("https://car-rental.example", anchors, {
engine,
trustMarkVerification: { mode: "resolve" },
});
if (!result.ok) throw new Error(result.error.description);
const mark = result.value.trustChain.trustMarks.find(
mark => mark.trustMarkType === "https://licence-federation.example/marks/approved-verifier",
);
if (!mark) throw new Error("No verified verifier accreditation");
const name = mark.claims?.["organization_name#fr"];
return typeof name === "string" ? name : mark.subject;
}
// Render the returned label as text. It is not proof of current active status.
Treat strings as text, constrain external image/link loading, and keep any claims about current status tied to the evidence the application actually checked. Historical signature verification alone cannot justify an “active” badge. A valid mark may support an application decision under Federation §18; the framework and the host decide what that accreditation means.
Render claims after the trust decision
Show Maya which organization issued Car Rental Company's accreditation and what type was accepted. Keep that display grounded in validated claims and the application's interpretation of the mark type. A logo or external reference is presentation information, not an additional trust anchor.
Treat text and links as untrusted display input even after signature verification. Escape text in the UI, apply your URL and image-fetch policy, and avoid silently sending the wallet user's context to a third-party image server. If accreditation is required for an operation, enforce that requirement before showing an affirmative badge.