Cache adapter for storing validated access token claims.
Implement this interface to persist validated claims in an external store such as Redis, Memcached, or an in-memory cache.
delete(key:string):Promise<void>
Removes an entry from the cache.
| Parameter | Type | Description |
|---|---|---|
key | string | The cache key to delete. |
Promise<void>
Retrieves cached claims by key.
| Parameter | Type | Description |
|---|---|---|
key | string | The cache key. |
Promise<AccessTokenClaims | null | undefined>
The cached claims, or null/undefined if the entry does not exist or has expired.
Stores validated claims in the cache.
| Parameter | Type | Description |
|---|---|---|
key | string | The cache key (access token). |
claims | AccessTokenClaims | The validated access token claims to cache. |
expiresAt | number | The token's expiration time as a Unix epoch timestamp (seconds). |
Promise<void>