From c1656e3edd21cadd1e29f83cb2577d9f6e52bf30 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 11 Dec 2023 12:56:11 +0100 Subject: [PATCH] fix jwt claim array support fixes support of claim array values (was shown "[Object]" before) Signed-off-by: Markus Blaschke --- src/tools/jwt-parser/jwt-parser.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/jwt-parser/jwt-parser.service.ts b/src/tools/jwt-parser/jwt-parser.service.ts index cc39145a..543f4c8b 100644 --- a/src/tools/jwt-parser/jwt-parser.service.ts +++ b/src/tools/jwt-parser/jwt-parser.service.ts @@ -19,7 +19,7 @@ function decodeJwt({ jwt }: { jwt: string }) { function parseClaims({ claim, value }: { claim: string; value: unknown }) { const claimDescription = CLAIM_DESCRIPTIONS[claim]; - const formattedValue = _.isPlainObject(value) ? JSON.stringify(value, null, 3) : _.toString(value); + const formattedValue = _.isPlainObject(value) || _.isArray(value) ? JSON.stringify(value, null, 3) : _.toString(value); const friendlyValue = getFriendlyValue({ claim, value }); return {