ovok_sdk.auth.session_store

Persistence of the user session in `OvokStorage`.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.25+2ba84b0

Persistence of the user session in OvokStorage.

SessionStore

SessionStore(storage: OvokStorage, key: str)

Keeps the session as JSON in the TypeScript SDK's shape, so stores are interchangeable.

Parameters

NameTypeDefaultDescription
storageOvokStorageWhere the session is kept.
keystrStorage key of the session.

for_tenant()

for_tenant(storage: OvokStorage, tenant_code: str) -> SessionStore

One key per tenant, so clearing a session never touches anything else in shared storage.

load()

load() -> Session | None

Return the stored session, or None when none is stored or it is unreadable.

save()

save(session: Session) -> None

Store session, replacing any earlier one.

clear()

clear() -> None

Delete the stored session.

Last updated on

On this page