({
value,
format,
}: {
value: string;
format: JSONJWTStringFormat;
})
| 37 | import { inferTemporal } from "~/utilities/inferredTemporal"; |
| 38 | |
| 39 | function PropertiesJwt({ |
| 40 | value, |
| 41 | format, |
| 42 | }: { |
| 43 | value: string; |
| 44 | format: JSONJWTStringFormat; |
| 45 | }) { |
| 46 | const properties: DataTableRow[] = []; |
| 47 | |
| 48 | const decodedPayload = jwtDecode(value) as Record<string, any>; |
| 49 | |
| 50 | for (const [key, value] of Object.entries(decodedPayload)) { |
| 51 | properties.push({ |
| 52 | key: key, |
| 53 | value, |
| 54 | }); |
| 55 | } |
| 56 | |
| 57 | const decodedHeader = jwtDecode(value, { header: true }) as Record< |
| 58 | string, |
| 59 | any |
| 60 | >; |
| 61 | |
| 62 | for (const [key, value] of Object.entries(decodedHeader)) { |
| 63 | properties.push({ |
| 64 | key: key, |
| 65 | value, |
| 66 | }); |
| 67 | } |
| 68 | |
| 69 | return <DataTable rows={properties} />; |
| 70 | } |
| 71 | |
| 72 | function PropertiesTimestamp({ |
| 73 | value, |
nothing calls this directly
no outgoing calls
no test coverage detected