(body: unknown, status = 200)
| 1540 | // --------------------------------------------------------------------------- |
| 1541 | |
| 1542 | const json = (body: unknown, status = 200): Response => |
| 1543 | new Response(JSON.stringify(body), { |
| 1544 | status, |
| 1545 | headers: { 'content-type': 'application/json; charset=utf-8' }, |
| 1546 | }); |
| 1547 | |
| 1548 | /** Constant-time over digests, so neither the length nor a prefix of the token leaks. */ |
| 1549 | async function tokenMatches(provided: string, expected: string): Promise<boolean> { |