MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / assertJtiNotRevoked

Function assertJtiNotRevoked

apps/api/src/api/auth/auth.plugin.ts:22–32  ·  view source on GitHub ↗
(jti: string | null)

Source from the content-addressed store, hash-verified

20 * they flow through unchecked and expire on their 15-minute clock.
21 */
22const 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
34const assertUserNotRevokedSince = async (
35 userId: string,

Callers 1

assertNotRevokedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected