clear

inline fun <T : Any> CurrentSession.clear()(source)
fun <T : Any> CurrentSession.clear(klass: KClass<T>)(source)

Clears a session instance with the type T.

Report a problem

Throws

if no session provider is registered for the type T


inline suspend fun <T : Any> CurrentSession.clear(sessionId: String)(source)

Clears a session with the specified sessionId for the session type T. This method allows clearing sessions by ID without needing the session instance.

Report a problem

Parameters

sessionId

the session ID to invalidate

Throws

if no session provider is registered for the type T or the session provider for type T doesn't use session IDs


suspend fun <T : Any> CurrentSession.clear(klass: KClass<T>, sessionId: String)(source)

Clears a session with the specified sessionId for the session type klass. This method allows clearing sessions by ID without needing the session instance.

Report a problem

Parameters

klass

the session class type

sessionId

the session ID to invalidate

Throws

if no session provider is registered for the type klass or the session provider for type klass doesn't use session IDs