Skip to content
Snippets Groups Projects
Commit fffde1cc authored by Taras's avatar Taras
Browse files

Fix remove session

parent 4cc874c9
No related branches found
No related tags found
No related merge requests found
...@@ -165,5 +165,5 @@ interface AuthenticationService { ...@@ -165,5 +165,5 @@ interface AuthenticationService {
/** /**
* Added for switch user * Added for switch user
*/ */
fun removeSession(sessionId: String) suspend fun removeSession(sessionId: String)
} }
...@@ -79,7 +79,8 @@ internal class SessionManager @Inject constructor( ...@@ -79,7 +79,8 @@ internal class SessionManager @Inject constructor(
} }
//Added for switch user //Added for switch user
fun removeSession(sessionId: String) { suspend fun removeSession(sessionId: String) {
if (sessionComponents.containsKey(sessionId)) sessionComponents.remove(sessionId) sessionComponents.remove(sessionId)
sessionParamsStore.delete(sessionId)
} }
} }
...@@ -494,7 +494,7 @@ internal class DefaultAuthenticationService @Inject constructor( ...@@ -494,7 +494,7 @@ internal class DefaultAuthenticationService @Inject constructor(
override fun createSessionFromParams(params: SessionParams): Session = sessionManager.getOrCreateSession(params) override fun createSessionFromParams(params: SessionParams): Session = sessionManager.getOrCreateSession(params)
//Added for switch user //Added for switch user
override fun removeSession(sessionId: String) { override suspend fun removeSession(sessionId: String) {
sessionManager.removeSession(sessionId) sessionManager.removeSession(sessionId)
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment