(value: unknown)
| 89 | const validRefreshBody = { access_token: "tok2", token_type: "Bearer", expires_in: 3600 }; |
| 90 | |
| 91 | const jwtPart = (value: unknown): string => |
| 92 | Buffer.from(JSON.stringify(value)).toString("base64url"); |
| 93 | |
| 94 | const unsignedJwt = (claims: Record<string, unknown>, alg = "RS256"): string => |
| 95 | `${jwtPart({ alg, typ: "JWT" })}.${jwtPart(claims)}.sig`; |