interface SessionTracker<S : Any>
SessionTracker provides ability to track and extract session from the call context.
abstract suspend fun clear(call: ApplicationCall): Unit
Clear session information |
|
abstract suspend fun load(call: ApplicationCall, transport: String?): S?
Load session value from transport string for the specified call |
|
abstract suspend fun store(call: ApplicationCall, value: S): String
Store session value and return respective transport string for the specified call. |
|
abstract fun validate(value: S): Unit
Validate session information |
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. |
|
class SessionTrackerByValue<S : Any> : SessionTracker<S>
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. |