@@ -48,3 +48,3 @@ /** | ||
| * | ||
| * // see https://undici.nodejs.org/#/docs/api/EnvHttpProxyAgent | ||
| * // see https://undici.nodejs.org/api/EnvHttpProxyAgent | ||
| * let envHttpProxyAgent = new undici.EnvHttpProxyAgent() | ||
@@ -63,3 +63,3 @@ * | ||
| * | ||
| * // see https://undici.nodejs.org/#/docs/api/RetryAgent | ||
| * // see https://undici.nodejs.org/api/RetryAgent | ||
| * let retryAgent = new undici.RetryAgent(new undici.Agent(), { | ||
@@ -89,3 +89,3 @@ * statusCodes: [], | ||
| * | ||
| * // see https://undici.nodejs.org/#/docs/api/MockAgent | ||
| * // see https://undici.nodejs.org/api/MockAgent | ||
| * let mockAgent = new undici.MockAgent() | ||
@@ -92,0 +92,0 @@ * mockAgent.disableNetConnect() |
@@ -12,3 +12,3 @@ import { JOSEError, JWKSNoMatchingKey, JWKSTimeout } from '../util/errors.js'; | ||
| const NAME = 'jose'; | ||
| const VERSION = 'v6.2.3'; | ||
| const VERSION = 'v6.2.4'; | ||
| USER_AGENT = `${NAME}/${VERSION}`; | ||
@@ -15,0 +15,0 @@ } |
| import { invalidKeyInput } from './invalid_key_input.js'; | ||
| import { encode as b64u } from '../util/base64url.js'; | ||
| import { isCryptoKey, isKeyObject } from './is_key_like.js'; | ||
| function omitUndefinedProperties(jwk) { | ||
| return Object.fromEntries(Object.entries(jwk).filter(([, value]) => value !== undefined)); | ||
| } | ||
| export async function keyToJWK(key) { | ||
@@ -25,3 +28,3 @@ if (isKeyObject(key)) { | ||
| } | ||
| const { ext, key_ops, alg, use, ...jwk } = await crypto.subtle.exportKey('jwk', key); | ||
| const { ext, key_ops, alg, use, ...jwk } = omitUndefinedProperties(await crypto.subtle.exportKey('jwk', key)); | ||
| if (jwk.kty === 'AKP') { | ||
@@ -28,0 +31,0 @@ ; |
+1
-1
| { | ||
| "name": "jose", | ||
| "version": "6.2.3", | ||
| "version": "6.2.4", | ||
| "description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+1
-4
@@ -121,5 +121,2 @@ # jose | ||
| | [v6.x](https://github.com/panva/jose/tree/v6.x) | [Security Policy] | ✅ | ✅ | Universal[^universal] ESM[^cjs] | | ||
| | [v5.x](https://github.com/panva/jose/tree/v5.x) | [Security Policy] | ❌ | ❌ | Universal[^universal] CJS + ESM | | ||
| | [v4.x](https://github.com/panva/jose/tree/v4.x) | [Security Policy] | ❌ | ❌ | Universal[^universal] CJS + ESM | | ||
| | [v2.x](https://github.com/panva/jose/tree/v2.x) | [Security Policy] | ❌ | ❌ | Node.js CJS | | ||
@@ -141,3 +138,3 @@ ## Specifications | ||
| - Fully-Specified Algorithms for JOSE - [RFC9864](https://www.rfc-editor.org/rfc/rfc9864.html) | ||
| - ML-DSA for JOSE - [draft-ietf-cose-dilithium-10](https://www.ietf.org/archive/id/draft-ietf-cose-dilithium-10.html) | ||
| - ML-DSA for JOSE - [RFC9964](https://www.rfc-editor.org/rfc/rfc9964.html) | ||
@@ -144,0 +141,0 @@ The algorithm implementations in `jose` have been tested using test vectors from their respective specifications as well as [RFC7520](https://www.rfc-editor.org/rfc/rfc7520). |
6308
0.05%257393
-0.13%151
-1.95%