Skip to content

LokiFileAdapter

File-system data adapter using LokiJS

  • Usage: const dataAdapter = await LokiFileAdapter.factory();
  • Requires: bun add lokijs and bun add -D @types/lokijs

See

LokiJS

Extends

  • BaseLokiAdapter

Properties

db

db: LokiConstructor

Database

  • Initialized at async constructor

Inherited from

BaseLokiAdapter.db

Defined in

src/dataAdapters/BaseLokiAdapter.ts:10


options

options: LokiFileAdapterOptions

Options

Defined in

src/dataAdapters/LokiFileAdapter.ts:38


sessions

sessions: Collection<OIDCClientSession>

Sessions collection

  • Initialized at async constructor

Inherited from

BaseLokiAdapter.sessions

Defined in

src/dataAdapters/BaseLokiAdapter.ts:15

Methods

close()

readonly close(): void

Close database

Returns

void

Inherited from

BaseLokiAdapter.close

Defined in

src/dataAdapters/BaseLokiAdapter.ts:71


delete()

readonly delete(sessionId): void

Delete session

Parameters

sessionId: string

Session ID

Returns

void

Inherited from

BaseLokiAdapter.delete

Defined in

src/dataAdapters/BaseLokiAdapter.ts:58


fetch()

readonly fetch(sessionId): null | OIDCClientSession

Fetch session

Parameters

sessionId: string

Session ID

Returns

null | OIDCClientSession

Inherited from

BaseLokiAdapter.fetch

Defined in

src/dataAdapters/BaseLokiAdapter.ts:21


insert()

readonly insert(session): void

Insert session

Parameters

session: OIDCClientSession

Session

Returns

void

Inherited from

BaseLokiAdapter.insert

Defined in

src/dataAdapters/BaseLokiAdapter.ts:33


prune()

prune(): void

Prune expired sessions

Returns

void

Inherited from

BaseLokiAdapter.prune

Defined in

src/dataAdapters/BaseLokiAdapter.ts:63


update()

readonly update(session): void

Update session

Parameters

session: OIDCClientSession

Session

Returns

void

Inherited from

BaseLokiAdapter.update

Defined in

src/dataAdapters/BaseLokiAdapter.ts:41


factory()

static factory(options?): Promise<LokiFileAdapter>

Async constructor

Parameters

options?: Partial<LokiFileAdapterOptions>

LokiFileAdapterOptions

Returns

Promise<LokiFileAdapter>

LokiFileAdapter instance

Defined in

src/dataAdapters/LokiFileAdapter.ts:74