From 4a5c45347c46875a88752e975ba605f6d029741c Mon Sep 17 00:00:00 2001 From: elizabethhealy Date: Mon, 9 Dec 2024 18:09:25 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20=F0=9F=8E=A8=20Autoformat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/src/cli.ts | 26 ++++++++++++++++++-------- lib/tdf3/src/client/builders.ts | 4 +++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/cli/src/cli.ts b/cli/src/cli.ts index d803f71f..c8a40082 100644 --- a/cli/src/cli.ts +++ b/cli/src/cli.ts @@ -122,7 +122,9 @@ function addParams(client: AnyNanoClient, argv: Partial) { log('SILLY', `Built encrypt params dissems: ${client.dissems}, attrs: ${client.dataAttributes}`); } -async function parseAssertionVerificationKeys(s: string): Promise { +async function parseAssertionVerificationKeys( + s: string +): Promise { const u = JSON.parse(s); if (typeof u !== 'object' || u === null) { throw new Error('Invalid input: The input must be an object'); @@ -135,10 +137,13 @@ async function parseAssertionVerificationKeys(s: string): Promise): Promise): Promise { +async function correctAssertionKeys(alg: string, key: string): Promise { if (alg === 'HS256') { // Convert key string to Uint8Array if (typeof key !== 'string') { @@ -175,7 +182,7 @@ async function correctAssertionKeys(alg: string, key: string): Promise