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

    Function importLocal

    • Imports a JSON Web Key Set (JWKS) for local verification.

      This allows JWTs to be verified against a predefined set of public keys.

      Parameters

      • jwks: JSONWebKeySet

        The JSON Web Key Set containing the public keys.

      • Optionaloptions: { alg: Algoritm }

        Optional settings, including the algorithm to use.

      Returns Promise<{ public: CryptoKey }[]>

      A promise that resolves to an array containing the imported public key.

      const publicKeys = await JWK.importLocal(jwks, { alg: JWK.Algoritm.ES256 });
      console.log(publicKeys);