Comparing version 5.9.1 to 5.9.2
@@ -13,3 +13,3 @@ import fetchJwks from '../runtime/fetch_jwks.js'; | ||
const NAME = 'jose'; | ||
const VERSION = 'v5.9.1'; | ||
const VERSION = 'v5.9.2'; | ||
USER_AGENT = `${NAME}/${VERSION}`; | ||
@@ -16,0 +16,0 @@ } |
@@ -16,3 +16,3 @@ "use strict"; | ||
const NAME = 'jose'; | ||
const VERSION = 'v5.9.1'; | ||
const VERSION = 'v5.9.2'; | ||
USER_AGENT = `${NAME}/${VERSION}`; | ||
@@ -19,0 +19,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const node_crypto_1 = require("node:crypto"); | ||
const parse = (jwk) => { | ||
return (jwk.d ? node_crypto_1.createPrivateKey : node_crypto_1.createPublicKey)({ format: 'jwk', key: jwk }); | ||
const parse = (key) => { | ||
if (key.d) { | ||
return (0, node_crypto_1.createPrivateKey)({ format: 'jwk', key }); | ||
} | ||
return (0, node_crypto_1.createPublicKey)({ format: 'jwk', key }); | ||
}; | ||
exports.default = parse; |
@@ -13,3 +13,3 @@ import fetchJwks from '../runtime/fetch_jwks.js'; | ||
const NAME = 'jose'; | ||
const VERSION = 'v5.9.1'; | ||
const VERSION = 'v5.9.2'; | ||
USER_AGENT = `${NAME}/${VERSION}`; | ||
@@ -16,0 +16,0 @@ } |
import { createPrivateKey, createPublicKey } from 'node:crypto'; | ||
const parse = (jwk) => { | ||
return (jwk.d ? createPrivateKey : createPublicKey)({ format: 'jwk', key: jwk }); | ||
const parse = (key) => { | ||
if (key.d) { | ||
return createPrivateKey({ format: 'jwk', key }); | ||
} | ||
return createPublicKey({ format: 'jwk', key }); | ||
}; | ||
export default parse; |
@@ -54,4 +54,2 @@ /** | ||
kid?: string | ||
[propName: string]: unknown | ||
} | ||
@@ -65,4 +63,2 @@ | ||
x: string | ||
[propName: string]: unknown | ||
} | ||
@@ -74,4 +70,2 @@ | ||
d: string | ||
[propName: string]: unknown | ||
} | ||
@@ -87,4 +81,2 @@ | ||
y: string | ||
[propName: string]: unknown | ||
} | ||
@@ -96,4 +88,2 @@ | ||
d: string | ||
[propName: string]: unknown | ||
} | ||
@@ -107,4 +97,2 @@ | ||
n: string | ||
[propName: string]: unknown | ||
} | ||
@@ -132,4 +120,2 @@ | ||
qi: string | ||
[propName: string]: unknown | ||
} | ||
@@ -141,4 +127,2 @@ | ||
k: string | ||
[propName: string]: unknown | ||
} | ||
@@ -199,4 +183,2 @@ | ||
y?: string | ||
[propName: string]: unknown | ||
} | ||
@@ -203,0 +185,0 @@ |
{ | ||
"name": "jose", | ||
"version": "5.9.1", | ||
"version": "5.9.2", | ||
"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": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
550484
13389