Package Exports
- jwtfed
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jwtfed) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JWT Federations
JWTFed is a Node.js library that implements creating and signing entity statements, validation of entity statements, validation of trust chains, resolving protocol specific metadata and more.
Read more about JWT Federations
To install
npm i jwtfed --saveRun demo suite with:
npm startEdit index.js to play with different entity statement claims, and run again.
node lookup.js openidClient https://serviceprovider.andreas.labs.uninett.no/application1007Generate new keys for the jwks keystore (to stdout) by typing:
node generate some_key_identifierClass ESFetcher
Fetching entity statements
const fetcher = new ESFetcher()
fetcher.fetchChained(entityid)
.then((list) => {
console.log("Result")
})Class TrustChain
Instanciate with a trustroot.
const tc = new TrustChain(trustroot)Add signed entitystatement objects.
list.forEach((es) => {
tc.add(es)
})
tc.dump()Look for paths, for a specific leaf node:
let paths = tc.findPaths('https://foodle.uninett.no')
if (paths.length === 0) {throw new Error("No trust paths found")}