SessionTrackerById

class SessionTrackerById<S : Any>(val type: KClass<S>, val serializer: SessionSerializer<S>, val storage: SessionStorage, val sessionIdProvider: () -> String) : SessionTracker<S>

SessionTracker that transfers a Session ID generated by a sessionIdProvider in HTTP Headers/Cookies. It uses a storage and a serializer to store/load serialized/deserialized session content of a specific type.

Constructors

Link copied to clipboard
fun <S : Any> SessionTrackerById(type: KClass<S>, serializer: SessionSerializer<S>, storage: SessionStorage, sessionIdProvider: () -> String)

Functions

Link copied to clipboard
open suspend override fun clear(call: ApplicationCall)

Clear session information

Link copied to clipboard
open suspend override fun load(call: ApplicationCall, transport: String?): S?

Load session value from transport string for the specified call

Link copied to clipboard
open suspend override fun store(call: ApplicationCall, value: S): String

Store session value and return respective transport string for the specified call.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun validate(value: S)

Validate session information

Properties

Link copied to clipboard

session serializer

Link copied to clipboard

is a function that generates session IDs

Link copied to clipboard

session storage to store session

Link copied to clipboard
val type: KClass<S>

is a session instance type