Skip to main content

BffSessionProvider

Axis Vertex JavaScript SDK: core


Axis Vertex JavaScript SDK: core / server / BffSessionProvider

Interface: BffSessionProvider

Every mutation is atomic across the provider's declared scope. compareAndSet never inserts an absent/expired record, and binds the complete expected version/owner/fence. invalidate must fence outstanding writers. Storage faults throw BffError; null means only absent/expired.

Properties​

scope​

readonly scope: "process" | "shared"

Methods​

close()​

close(): Promise<void>

Returns​

Promise<void>


compareAndSet()​

compareAndSet(id, expected, replacement): Promise<ProviderResult>

Parameters​

id​

string

expected​

BffRecord

replacement​

BffRecord

Returns​

Promise<ProviderResult>


create()​

create(id, record): Promise<ProviderResult>

Parameters​

id​

string

record​

BffRecord

Returns​

Promise<ProviderResult>


invalidate()​

invalidate(id): Promise<BffRecord | null>

Parameters​

id​

string

Returns​

Promise<BffRecord | null>


read()​

read(id): Promise<BffRecord | null>

Parameters​

id​

string

Returns​

Promise<BffRecord | null>


rotate()​

rotate(id, expected, nextId, session): Promise<ProviderResult>

Atomically consumes expected prelogin and creates a new session ID.

Parameters​

id​

string

expected​

BffRecord

nextId​

string

session​

BffRecord

Returns​

Promise<ProviderResult>