Infrastructure medium complexity Shared Component backend
0
Dependencies
1
Dependents
1
Entities
0
Integrations

Description

Short-lived storage for revoked JWT access token JTIs to ensure immediate revocation takes effect within the token's remaining TTL. Implemented as a database blocklist table for MVP (Redis upgrade path available post-MVP). Checked on every authenticated request via middleware.

Feature: Session Management

token-blocklist

Responsibilities

  • Store revoked access token JTIs with TTL matching the token's remaining lifetime
  • Check incoming JTIs against the blocklist on every authenticated request
  • Purge expired blocklist entries to prevent unbounded table growth
  • Provide fast lookup to minimize per-request latency

Interfaces

addToBlocklist(jti: string, expiresAt: Date): void
isBlocked(jti: string): boolean
purgeExpired(): void
getBlocklistSize(): number

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component