@oidfed/core
v1.0.0
Published
Federation primitives for JavaScript — entity statements, trust chain resolution, metadata policy, and cryptographic verification for OpenID Federation 1.0 deployments.
Maintainers
Readme
@oidfed/core
Federation primitives for JavaScript — entity statements, trust chain resolution, metadata policy, and cryptographic verification. The foundational layer for OpenID Federation 1.0 deployments.
Targets the final OpenID Federation 1.0 specification and its successor specifications:
- OpenID Federation 1.1 (protocol-independent layer)
- OpenID Federation for OpenID Connect 1.1 (protocol-specific layer)
- OpenID Federation Extended Subordinate Listing 1.0 (tracks draft-02)
Install
Choose the command for your preferred JavaScript package manager or runtime:
# npm
npm install @oidfed/core
# pnpm
pnpm add @oidfed/core
# yarn
yarn add @oidfed/core
# bun
bun add @oidfed/core
# Deno (Deno 2.0+ / JSR/npm specifier auto-resolution)
deno add npm:@oidfed/coreQuick Start
import {
entityId,
generateSigningKey,
resolveTrustChains,
validateTrustChain,
createTrustAnchorSet,
} from "@oidfed/core";
const trustAnchors = createTrustAnchorSet([
{ entityId: "https://ta.example.org", jwks: { keys: [taKey] } },
]);
const result = await resolveTrustChains(
entityId("https://leaf.example.com"),
trustAnchors,
);
for (const chain of result.chains) {
const validated = await validateTrustChain(chain.statements, trustAnchors);
if (validated.valid) {
console.log(validated.chain.resolvedMetadata);
}
}Documentation
For a detailed API reference, configuration options, and core architectural guides, see the docs/packages/core.md file.
License
Apache-2.0 — see NOTICE for attribution.
