Interface: RevocationCache
Interface: RevocationCache
Defined in: auth-server-ts/src/contracts/revocation-cache.ts:19
Hot-path cache port for revocation lookups.
Two keys are owned by the Go auth-server and read by us:
auth:blacklist:{jti}— per-token revocationauth:user_tv:{user_id}— per-user token-version
Implementations must fail-open: if the backend (Redis) is unreachable, silently return false / null. Matches the Go server’s NoOp fallback (auth-server CLAUDE.md gotcha #5).
Mirrors PHP’s Vendidit\AuthServer\Contracts\RevocationCache.
A second, legacy port (TokenCachePort) is exported for back-compat
with the original TokenValidator class — same shape, just spelled
differently. The NestJS adapter’s RedisTokenCacheAdapter implements
the legacy port.
Methods
exists()
exists(
key):Promise<boolean>
Defined in: auth-server-ts/src/contracts/revocation-cache.ts:20
Parameters
key
string
Returns
Promise<boolean>
get()
get(
key):Promise<string|null>
Defined in: auth-server-ts/src/contracts/revocation-cache.ts:21
Parameters
key
string
Returns
Promise<string | null>