Implement didRefreshTokens(): update database with updated SessionData.

This commit is contained in:
Benoit Marty 2023-08-23 14:42:46 +02:00
parent 8cf48986e7
commit d293cae47f
8 changed files with 109 additions and 15 deletions

View file

@ -23,6 +23,12 @@ interface SessionStore {
fun isLoggedIn(): Flow<Boolean>
fun sessionsFlow(): Flow<List<SessionData>>
suspend fun storeData(sessionData: SessionData)
/**
* Will update the session data matching the userId, except the value of loginTimestamp.
* No op if userId is not found in DB.
*/
suspend fun updateData(sessionData: SessionData)
suspend fun getSession(sessionId: String): SessionData?
suspend fun getAllSessions(): List<SessionData>
suspend fun getLatestSession(): SessionData?