mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-07 23:05:11 -04:00
fix jwt claim array support
fixes support of claim array values (was shown "[Object]" before) Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
This commit is contained in:
parent
80e46c9292
commit
c1656e3edd
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue