Comparing version 3.4.0 to 3.5.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [3.5.0](https://github.com/panva/jose/compare/v3.4.0...v3.5.0) (2020-12-17) | ||
### Features | ||
* added JWE General JSON Serialization decryption ([16dea9e](https://github.com/panva/jose/commit/16dea9ec7d6179471f794a3463bba0c6e77295ff)) | ||
## [3.4.0](https://github.com/panva/jose/compare/v3.3.2...v3.4.0) (2020-12-16) | ||
@@ -7,0 +14,0 @@ |
@@ -12,5 +12,9 @@ import verify from '../flattened/verify.js'; | ||
for (const signature of jws.signatures) { | ||
const flattened = { payload: jws.payload, ...signature }; | ||
try { | ||
return await verify(flattened, key, options); | ||
return await verify({ | ||
header: signature.header, | ||
payload: jws.payload, | ||
protected: signature.protected, | ||
signature: signature.signature, | ||
}, key, options); | ||
} | ||
@@ -17,0 +21,0 @@ catch (_a) { |
@@ -14,5 +14,9 @@ "use strict"; | ||
for (const signature of jws.signatures) { | ||
const flattened = { payload: jws.payload, ...signature }; | ||
try { | ||
return await verify_js_1.default(flattened, key, options); | ||
return await verify_js_1.default({ | ||
header: signature.header, | ||
payload: jws.payload, | ||
protected: signature.protected, | ||
signature: signature.signature, | ||
}, key, options); | ||
} | ||
@@ -19,0 +23,0 @@ catch { |
@@ -12,5 +12,9 @@ import verify from '../flattened/verify.js'; | ||
for (const signature of jws.signatures) { | ||
const flattened = { payload: jws.payload, ...signature }; | ||
try { | ||
return await verify(flattened, key, options); | ||
return await verify({ | ||
header: signature.header, | ||
payload: jws.payload, | ||
protected: signature.protected, | ||
signature: signature.signature, | ||
}, key, options); | ||
} | ||
@@ -17,0 +21,0 @@ catch { |
@@ -14,5 +14,9 @@ "use strict"; | ||
for (const signature of jws.signatures) { | ||
const flattened = { payload: jws.payload, ...signature }; | ||
try { | ||
return await verify_js_1.default(flattened, key, options); | ||
return await verify_js_1.default({ | ||
header: signature.header, | ||
payload: jws.payload, | ||
protected: signature.protected, | ||
signature: signature.signature, | ||
}, key, options); | ||
} | ||
@@ -19,0 +23,0 @@ catch { |
@@ -12,5 +12,9 @@ import verify from '../flattened/verify.js'; | ||
for (const signature of jws.signatures) { | ||
const flattened = { payload: jws.payload, ...signature }; | ||
try { | ||
return await verify(flattened, key, options); | ||
return await verify({ | ||
header: signature.header, | ||
payload: jws.payload, | ||
protected: signature.protected, | ||
signature: signature.signature, | ||
}, key, options); | ||
} | ||
@@ -17,0 +21,0 @@ catch { |
@@ -319,2 +319,6 @@ /// <reference lib="dom"/> | ||
export interface GeneralJWE extends Omit<FlattenedJWE, 'encrypted_key' | 'header'> { | ||
recipients: Pick<FlattenedJWE, 'encrypted_key' | 'header'>[] | ||
} | ||
/** | ||
@@ -556,2 +560,4 @@ * Recognized JWE Header Parameters, any other Header members | ||
export interface GeneralDecryptResult extends FlattenedDecryptResult {} | ||
export interface CompactDecryptResult { | ||
@@ -558,0 +564,0 @@ /** |
{ | ||
"name": "jose", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "Universal 'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK with no dependencies", | ||
@@ -94,2 +94,11 @@ "keywords": [ | ||
}, | ||
"./jwe/general/decrypt": { | ||
"browser": "./dist/browser/jwe/general/decrypt.js", | ||
"import": "./dist/node/esm/jwe/general/decrypt.js", | ||
"require": "./dist/node/cjs/jwe/general/decrypt.js" | ||
}, | ||
"./webcrypto/jwe/general/decrypt": { | ||
"import": "./dist/node/webcrypto/esm/jwe/general/decrypt.js", | ||
"require": "./dist/node/webcrypto/cjs/jwe/general/decrypt.js" | ||
}, | ||
"./jwk/embedded": { | ||
@@ -96,0 +105,0 @@ "browser": "./dist/browser/jwk/embedded.js", |
@@ -42,3 +42,3 @@ # jose | ||
- Encryption - [Compact](docs/classes/_jwe_compact_encrypt_.compactencrypt.md#readme), [Flattened](docs/classes/_jwe_flattened_encrypt_.flattenedencrypt.md#readme) | ||
- Decryption - [Compact](docs/functions/_jwe_compact_decrypt_.compactdecrypt.md#readme), [Flattened](docs/functions/_jwe_flattened_decrypt_.flatteneddecrypt.md#readme) | ||
- Decryption - [Compact](docs/functions/_jwe_compact_decrypt_.compactdecrypt.md#readme), [Flattened](docs/functions/_jwe_flattened_decrypt_.flatteneddecrypt.md#readme), [General](docs/functions/_jwe_general_decrypt_.generaldecrypt.md#readme) | ||
- JSON Web Signature (JWS) | ||
@@ -78,3 +78,3 @@ - Signing - [Compact](docs/classes/_jws_compact_sign_.compactsign.md#readme), [Flattened](docs/classes/_jws_flattened_sign_.flattenedsign.md#readme), [General](docs/classes/_jws_general_sign_.generalsign.md#readme) | ||
| Compact | ✓ | ✓ | ✓ | ✓ | | ||
| General JSON | ✓ | ✓ | ✕ | ✕ | | ||
| General JSON | ✓ | ✓ | ✕ | ✓ | | ||
| Flattened JSON | ✓ | ✓ | ✓ | ✓ | | ||
@@ -81,0 +81,0 @@ |
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
676288
380
15909