class SessionTrackerById<S : Any> : 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.
SessionTrackerById(type: KClass<S>, serializer: SessionSerializer<S>, storage: SessionStorage, sessionIdProvider: () -> String)
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. |
val serializer: SessionSerializer<S>
session serializer |
|
val sessionIdProvider: () -> String
is a function that generates session IDs |
|
val storage: SessionStorage
session storage to store session |
|
val type: KClass<S>
is a session instance type |
suspend fun clear(call: ApplicationCall): Unit
Clear session information |
|
suspend fun load(call: ApplicationCall, transport: String?): S?
Load session value from transport string for the specified call |
|
suspend fun store(call: ApplicationCall, value: S): String
Store session value and return respective transport string for the specified call. |
|
fun toString(): String |
|
fun validate(value: S): Unit
Validate session information |