Loading app/src/main/java/foundation/e/apps/login/AuthDataValidator.kt +19 −1 Original line number Diff line number Diff line /* * Copyright MURENA SAS 2023 * Apps Quickly and easily install Android apps onto your device! * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ package foundation.e.apps.login import com.aurora.gplayapi.data.models.AuthData import foundation.e.apps.api.ResultSupreme interface AuthDataValidator { suspend fun fetchAuthData(): ResultSupreme<AuthData?> suspend fun validateAuthData(): ResultSupreme<AuthData?> } No newline at end of file app/src/main/java/foundation/e/apps/login/LoginSourceGPlay.kt +1 −1 Original line number Diff line number Diff line Loading @@ -253,7 +253,7 @@ class LoginSourceGPlay @Inject constructor( } } override suspend fun fetchAuthData(): ResultSupreme<AuthData?> { override suspend fun validateAuthData(): ResultSupreme<AuthData?> { val savedAuth = getSavedAuthData() if (!isAuthDataValid(savedAuth)) { Timber.i("Validating AuthData...") Loading app/src/main/java/foundation/e/apps/login/LoginSourceRepository.kt +1 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,6 @@ class LoginSourceRepository @Inject constructor( suspend fun getValidatedAuthData(): ResultSupreme<AuthData?> { val authDataValidator = (sources.find { it is AuthDataValidator } as AuthDataValidator) return authDataValidator.fetchAuthData() return authDataValidator.validateAuthData() } } Loading
app/src/main/java/foundation/e/apps/login/AuthDataValidator.kt +19 −1 Original line number Diff line number Diff line /* * Copyright MURENA SAS 2023 * Apps Quickly and easily install Android apps onto your device! * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ package foundation.e.apps.login import com.aurora.gplayapi.data.models.AuthData import foundation.e.apps.api.ResultSupreme interface AuthDataValidator { suspend fun fetchAuthData(): ResultSupreme<AuthData?> suspend fun validateAuthData(): ResultSupreme<AuthData?> } No newline at end of file
app/src/main/java/foundation/e/apps/login/LoginSourceGPlay.kt +1 −1 Original line number Diff line number Diff line Loading @@ -253,7 +253,7 @@ class LoginSourceGPlay @Inject constructor( } } override suspend fun fetchAuthData(): ResultSupreme<AuthData?> { override suspend fun validateAuthData(): ResultSupreme<AuthData?> { val savedAuth = getSavedAuthData() if (!isAuthDataValid(savedAuth)) { Timber.i("Validating AuthData...") Loading
app/src/main/java/foundation/e/apps/login/LoginSourceRepository.kt +1 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,6 @@ class LoginSourceRepository @Inject constructor( suspend fun getValidatedAuthData(): ResultSupreme<AuthData?> { val authDataValidator = (sources.find { it is AuthDataValidator } as AuthDataValidator) return authDataValidator.fetchAuthData() return authDataValidator.validateAuthData() } }