Principal

interface Principal

An authenticated user, as returned by Xtdb.authenticateWithPassword and its siblings. Xtdb.connect opens connections as one, attributing their writes to userId.

Inheritors

Types

Link copied to clipboard
data class Static(val userId: String) : Principal

Properties

Link copied to clipboard
abstract val userId: String

Functions

Link copied to clipboard
abstract fun revalidate()

Refreshes this principal's credentials in place if they've expired; a no-op while they're still valid. Safe to call concurrently from every connection sharing the principal: an expiry is refreshed once.