Skip to main content
Dotset CLI API Documentation / tollgate / SessionStore

Interface: SessionStore

Defined in: src/tollgate/session/types.ts:219 Interface for session storage backends. Allows for in-memory or persistent storage.

Methods

clear()

clear(): void;
Defined in: src/tollgate/session/types.ts:239 Clear all grants

Returns

void

delete()

delete(id): boolean;
Defined in: src/tollgate/session/types.ts:230 Remove a grant

Parameters

id
string

Returns

boolean

findMatching()

findMatching(context): SessionGrant[];
Defined in: src/tollgate/session/types.ts:227 Find grants that might match a context

Parameters

context

Returns

SessionGrant[]

get()

get(id): SessionGrant | undefined;
Defined in: src/tollgate/session/types.ts:224 Get a grant by ID

Parameters

id
string

Returns

SessionGrant | undefined

getAll()

getAll(): SessionGrant[];
Defined in: src/tollgate/session/types.ts:236 Get all active grants

Returns

SessionGrant[]

getStats()

getStats(): SessionStats;
Defined in: src/tollgate/session/types.ts:242 Get statistics

Returns

pruneExpired()

pruneExpired(): number;
Defined in: src/tollgate/session/types.ts:233 Remove all expired grants

Returns

number

set()

set(grant): void;
Defined in: src/tollgate/session/types.ts:221 Store a new grant

Parameters

grant

Returns

void