@edgefirst-dev/jwt - v1.3.0
    Preparing search index...

    Function toJSON

    • Converts an array of key pairs into a JSON Web Key Set (JWKS) format.

      This format is commonly used for publishing public keys for JWT verification.

      Parameters

      • keys: KeyPair[]

        An array of key pairs to convert into JWKS format.

      Returns {
          keys: {
              crv: undefined | string;
              kid: undefined | string;
              kty: undefined | string;
              x: undefined | string;
              y: undefined | string;
          }[];
      }

      An object representing the JWKS structure.

      const jwks = JWK.toJSON(keyPairs);
      console.log(JSON.stringify(jwks, null, 2));