SessionTrackerByValue

class SessionTrackerByValue : SessionTracker

SessionTracker that stores the contents of the session as part of HTTP Cookies/Headers. It uses a specific serializer to serialize and deserialize objects of type type.

Constructors

<init>

SessionTrackerByValue(
    type: KClass<*>,
    serializer: SessionSerializer)

SessionTracker that stores the contents of the session as part of HTTP Cookies/Headers. It uses a specific serializer to serialize and deserialize objects of type type.

Properties

serializer

val serializer: SessionSerializer

session serializer

type

val type: KClass<*>

is a session instance type

Functions

clear

suspend fun clear(call: ApplicationCall): Unit

Clear session information

load

suspend fun load(
    call: ApplicationCall,
    transport: String?
): Any?

Load session value from transport string for the specified call

store

suspend fun store(call: ApplicationCall, value: Any): String

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

toString

fun toString(): String

validate

fun validate(value: Any): Unit

Validate session information