Some refactorization for the login logic
Description
- 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
- 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.
- 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
Edited by Jonathan Klee