JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q23879F
  • License ISC

JWT Federations supporting library

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 --save

Run demo suite with:

npm start

Edit index.js to play with different entity statement claims, and run again.

node lookup.js openidClient https://serviceprovider.andreas.labs.uninett.no/application1007

Generate new keys for the jwks keystore (to stdout) by typing:

node generate some_key_identifier

Class 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")}

Class EntityStatement

Class SignedEntityStatement