jose 4.3.3 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,11 +12,7 @@ export async function compactVerify(jws, key, options) {
|
|
|
12
12
|
if (length !== 3) {
|
|
13
13
|
throw new JWSInvalid('Invalid Compact JWS');
|
|
14
14
|
}
|
|
15
|
-
const verified = await flattenedVerify({
|
|
16
|
-
payload: (payload || undefined),
|
|
17
|
-
protected: protectedHeader || undefined,
|
|
18
|
-
signature: (signature || undefined),
|
|
19
|
-
}, key, options);
|
|
15
|
+
const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);
|
|
20
16
|
const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };
|
|
21
17
|
if (typeof key === 'function') {
|
|
22
18
|
return { ...result, key: verified.key };
|
|
@@ -15,11 +15,7 @@ async function compactVerify(jws, key, options) {
|
|
|
15
15
|
if (length !== 3) {
|
|
16
16
|
throw new errors_js_1.JWSInvalid('Invalid Compact JWS');
|
|
17
17
|
}
|
|
18
|
-
const verified = await (0, verify_js_1.flattenedVerify)({
|
|
19
|
-
payload: (payload || undefined),
|
|
20
|
-
protected: protectedHeader || undefined,
|
|
21
|
-
signature: (signature || undefined),
|
|
22
|
-
}, key, options);
|
|
18
|
+
const verified = await (0, verify_js_1.flattenedVerify)({ payload, protected: protectedHeader, signature }, key, options);
|
|
23
19
|
const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };
|
|
24
20
|
if (typeof key === 'function') {
|
|
25
21
|
return { ...result, key: verified.key };
|
|
@@ -12,11 +12,7 @@ export async function compactVerify(jws, key, options) {
|
|
|
12
12
|
if (length !== 3) {
|
|
13
13
|
throw new JWSInvalid('Invalid Compact JWS');
|
|
14
14
|
}
|
|
15
|
-
const verified = await flattenedVerify({
|
|
16
|
-
payload: (payload || undefined),
|
|
17
|
-
protected: protectedHeader || undefined,
|
|
18
|
-
signature: (signature || undefined),
|
|
19
|
-
}, key, options);
|
|
15
|
+
const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);
|
|
20
16
|
const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };
|
|
21
17
|
if (typeof key === 'function') {
|
|
22
18
|
return { ...result, key: verified.key };
|