( claims: Readonly<Record<string, unknown>>, key: string, )
| 1028 | const decodeJwtClaims = Schema.decodeUnknownOption(Schema.fromJsonString(JwtClaims)); |
| 1029 | |
| 1030 | const stringClaim = ( |
| 1031 | claims: Readonly<Record<string, unknown>>, |
| 1032 | key: string, |
| 1033 | ): string | undefined => { |
| 1034 | const value = claims[key]; |
| 1035 | if (typeof value !== "string") return undefined; |
| 1036 | const trimmed = value.trim(); |
| 1037 | return trimmed.length > 0 ? trimmed : undefined; |
| 1038 | }; |
| 1039 | |
| 1040 | const decodeJwtPayload = (token: string): Readonly<Record<string, unknown>> | null => { |
| 1041 | const payload = token.split(".")[1]; |
no outgoing calls
no test coverage detected