Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/jose/key/export.ts>exportJWK

"JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes.
Extremely Popular
Go to Latest
function exportJWK
import { exportJWK } from "https://deno.land/x/jose@v4.11.2/key/export.ts";

Exports a runtime-specific key representation (KeyLike) to a JWK.

Examples

Usage

const privateJwk = await jose.exportJWK(privateKey)
const publicJwk = await jose.exportJWK(publicKey)

console.log(privateJwk)
console.log(publicJwk)

Parameters

key: KeyLike | Uint8Array

Key representation to export as JWK.

Returns

Promise<JWK>