TenantInterface

interface TenantInterface

One tenant's handle (decision record 0090): built from the API key and the server's name, it fetches the server's service document once to learn where the services are, and signs users up and in. Nothing above it sees a host or a port. Named Tenant on these heads (see the crate documentation); the same object is Tacenta in Rust and TypeScript.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun isWebsocket(): Boolean

Whether the services are reached over the WebSocket carriage.

Link copied to clipboard
abstract suspend fun signIn(username: String, password: String, device: UByte): Client

Sign a user in with a fresh device identity, on device 1 unless another is given; a connected client. Save Client.exportState and resume with signInWithState.

Link copied to clipboard
abstract suspend fun signInWithState(username: String, password: String, state: ByteArray, device: UByte): Client

Sign in resuming persisted state (identity and live sessions) from Client.exportState.

Link copied to clipboard
abstract suspend fun signInWithStateSealed(username: String, password: String, state: ByteArray, store: SecureStore, device: UByte): Client

Sign in resuming sealed state from Client.exportStateSealed with store attached: the rollback-resistant path (decision 0078, anchor B). A forged or older-than-latest-send state is refused.

Link copied to clipboard
abstract suspend fun signUp(username: String, password: String)

Create a user in this tenant.

Link copied to clipboard
abstract fun websocket(): Tenant

The same tenant, reaching the services over the document's WebSocket carriage instead of their ports. Fails if the document offers none.