Skip to content

Commit 5ed3693

Browse files
authored
fix(jwt-parser): jwt claim array support (#799)
fixes support of claim array values (was shown "[Object]" before) Signed-off-by: Markus Blaschke <[email protected]>
1 parent 80e46c9 commit 5ed3693

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/jwt-parser/jwt-parser.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function decodeJwt({ jwt }: { jwt: string }) {
1919

2020
function parseClaims({ claim, value }: { claim: string; value: unknown }) {
2121
const claimDescription = CLAIM_DESCRIPTIONS[claim];
22-
const formattedValue = _.isPlainObject(value) ? JSON.stringify(value, null, 3) : _.toString(value);
22+
const formattedValue = _.isPlainObject(value) || _.isArray(value) ? JSON.stringify(value, null, 3) : _.toString(value);
2323
const friendlyValue = getFriendlyValue({ claim, value });
2424

2525
return {

0 commit comments

Comments
 (0)