(jti: string | null)
| 20 | * they flow through unchecked and expire on their 15-minute clock. |
| 21 | */ |
| 22 | const assertJtiNotRevoked = async (jti: string | null): Promise<void> => { |
| 23 | if (jti === null) { |
| 24 | return; |
| 25 | } |
| 26 | |
| 27 | const revoked = await jwtRevocationService.isJtiRevoked(jti); |
| 28 | |
| 29 | if (revoked) { |
| 30 | throw ApiErrors.unauthorized("Token revoked"); |
| 31 | } |
| 32 | }; |
| 33 | |
| 34 | const assertUserNotRevokedSince = async ( |
| 35 | userId: string, |