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

    Function importRemote

    • Imports a JSON Web Key Set (JWKS) from a remote URL for verification.

      This method fetches public keys dynamically from an external endpoint.

      Parameters

      • url: URL

        The URL of the remote JWKS endpoint.

      • options: RemoteJWKSetOptions & { alg: Algoritm }

        Options for fetching the keys, including the expected algorithm.

      Returns Promise<{ public: CryptoKey }[]>

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

      const publicKeys = await JWK.importRemote(new URL("https://example.com/.well-known/jwks.json"), { alg: JWK.Algoritm.ES256 });
      console.log(publicKeys);