SettingsSessionManager

class SettingsSessionManager(settings: Settings = createDefaultSettings(), key: String = SETTINGS_KEY, json: Json = settingsJson) : SessionManager(source)

A SessionManager that uses the Settings API.

Parameters

settings

The Settings instance to use. Defaults to createDefaultSettings.

key

The key to use for saving the session.

json

The Json instance to use for serialization. Defaults to settingsJson. Important: JsonBuilder.encodeDefaults must be set to true.

Constructors

Link copied to clipboard
constructor(settings: Settings = createDefaultSettings(), key: String = SETTINGS_KEY, json: Json = settingsJson)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun deleteSession()

Deletes the saved session from storage.

Link copied to clipboard
open suspend override fun loadSession(): UserSession?

Loads the saved session from storage.

Link copied to clipboard
open suspend override fun saveSession(session: UserSession)

Saves the given session.