/** * What the client knows is revoked. * * `enforce()` verifies a grant token offline, so on its own it cannot see a * revocation: the token stays cryptographically valid until it expires. This * set is the answer — a small in-memory index of the grants and tokens the * auth service says are no longer usable, kept current by the revocation feed. */ export type RevocationAction = 'revoked' | 'suspended' | 'resumed' | 'token_revoked'; export interface RevocationEntry { seq: number; action: RevocationAction; grantId: string | null; jti: string | null; expiresAt: string | null; at: string; } export interface CredentialRef { grantId?: string | undefined; tokenId?: string | undefined; parentGrantId?: string | undefined; } export interface RevocationMatch { /** Which identifier matched: the grant, the token, or the parent grant. */ kind: 'grant' | 'token' | 'parent_grant'; id: string; action: RevocationAction; } /** The identifiers a client believes are revoked or suspended, with when they expire. */ export declare class RevokedSet { #private; get size(): number; /** * Apply one feed entry. `resumed` removes a suspension; a revocation is * never undone, and the auth service never emits `resumed` for one. */ apply(entry: RevocationEntry): void; applyAll(entries: readonly RevocationEntry[]): void; /** * Replace everything this set knows with `entries`. * * A snapshot is the complete list of what is revoked or suspended *now*, so * applying one on top of an existing set keeps anything that has since been * resumed. A grant suspended, then resumed while the client was * disconnected, would go on being denied until it expired: the resume * entry passed by while nobody was listening, and the snapshot that * replaced the stream never mentions it. * * Nothing awaits between clearing and refilling, so no caller can observe * an empty set. */ replaceAll(entries: readonly RevocationEntry[]): void; /** Why this credential must not be used, or `null` if this set knows nothing against it. */ match(ref: CredentialRef, now?: number): RevocationMatch | null; /** Forget entries whose credential has expired; it can no longer be used anyway. */ prune(now?: number): void; clear(): void; } //# sourceMappingURL=set.d.ts.map