Comparing version 4.10.4 to 4.11.0
@@ -102,2 +102,3 @@ import { decode as decodeBase64URL, encodeBase64, decodeBase64 } from '../runtime/base64url.js'; | ||
export async function importJWK(jwk, alg, octAsKeyObject) { | ||
var _a; | ||
if (!isObject(jwk)) { | ||
@@ -117,3 +118,3 @@ throw new TypeError('JWK must be an object'); | ||
if (octAsKeyObject) { | ||
return asKeyObject({ ...jwk, alg, ext: false }); | ||
return asKeyObject({ ...jwk, alg, ext: (_a = jwk.ext) !== null && _a !== void 0 ? _a : false }); | ||
} | ||
@@ -120,0 +121,0 @@ return decodeBase64URL(jwk.k); |
@@ -108,2 +108,3 @@ "use strict"; | ||
async function importJWK(jwk, alg, octAsKeyObject) { | ||
var _a; | ||
if (!(0, is_object_js_1.default)(jwk)) { | ||
@@ -123,3 +124,3 @@ throw new TypeError('JWK must be an object'); | ||
if (octAsKeyObject) { | ||
return (0, jwk_to_key_js_1.default)({ ...jwk, alg, ext: false }); | ||
return (0, jwk_to_key_js_1.default)({ ...jwk, alg, ext: (_a = jwk.ext) !== null && _a !== void 0 ? _a : false }); | ||
} | ||
@@ -126,0 +127,0 @@ return (0, base64url_js_1.decode)(jwk.k); |
@@ -102,2 +102,3 @@ import { decode as decodeBase64URL, encodeBase64, decodeBase64 } from '../runtime/base64url.js'; | ||
export async function importJWK(jwk, alg, octAsKeyObject) { | ||
var _a; | ||
if (!isObject(jwk)) { | ||
@@ -117,3 +118,3 @@ throw new TypeError('JWK must be an object'); | ||
if (octAsKeyObject) { | ||
return asKeyObject({ ...jwk, alg, ext: false }); | ||
return asKeyObject({ ...jwk, alg, ext: (_a = jwk.ext) !== null && _a !== void 0 ? _a : false }); | ||
} | ||
@@ -120,0 +121,0 @@ return decodeBase64URL(jwk.k); |
{ | ||
"name": "jose", | ||
"version": "4.10.4", | ||
"description": "'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, and other Web-interoperable runtimes", | ||
"version": "4.11.0", | ||
"description": "'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes", | ||
"keywords": [ | ||
"browser", | ||
"bun", | ||
"cloudflare", | ||
@@ -64,2 +65,3 @@ "compact", | ||
"types": "./dist/types/index.d.ts", | ||
"bun": "./dist/browser/index.js", | ||
"deno": "./dist/browser/index.js", | ||
@@ -66,0 +68,0 @@ "browser": "./dist/browser/index.js", |
# jose | ||
> "JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, and other Web-interoperable runtimes. | ||
> "JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes. | ||
@@ -86,2 +86,3 @@ ## Implemented specs & features | ||
These are _(this is not an exhaustive list)_: | ||
- [Bun](https://github.com/panva/jose/issues/471) | ||
- [Browsers](https://github.com/panva/jose/issues/263) | ||
@@ -91,3 +92,2 @@ - [Cloudflare Workers](https://github.com/panva/jose/issues/265) | ||
- [Electron](https://github.com/panva/jose/issues/264) | ||
- [Netlify Edge](https://github.com/panva/jose/issues/266) | ||
- [Node.js](https://github.com/panva/jose/issues/262) | ||
@@ -94,0 +94,0 @@ - [Vercel's Edge Runtime](https://github.com/panva/jose/issues/301) |
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
554857
13784