Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Some refactorization for the login logic

Jonathan Klee requested to merge 0000-s-some-renamings into main

Description

  1. I made some renamings towards names that make more sense:
  • Rename LoginSourceInterface to StoreAuthenticator
  • Rename LoginSourceRepository to AuthenticatorRepository
  • Rename LoginDataStore to LoginData
  • Rename GPlayLoginInterface to PlayStoreLoginManager
  • Rename GPlayFactory to PlayStoreLoginManagerFactory
  • Rename BaseStoreRepository to StoreRepository
  1. I sanitized the PlayStoreLoginManager interface:

It is now:

interface PlayStoreLoginManager {
    suspend fun login(): AuthData?
    suspend fun validate(authData: AuthData): PlayResponse
}

Parameters of login are now taken from the data store.

  1. I also sanitized the StoreAuthenticator interface:
interface StoreAuthenticator {
    suspend fun login(): AuthObject
    suspend fun logout()
    fun isStoreActive(): Boolean
}

Screenshots

Technical details

Tests

Issues

10 commandments of code reviews

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/mobile-team/guidelines/Code-review

Edited by Jonathan Klee

Merge request reports

Loading