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

Commit 699cad48 authored by Hasib Prince's avatar Hasib Prince
Browse files

copyright text is added

parent 3685137b
Loading
Loading
Loading
Loading
Loading
+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
+1 −1
Original line number Diff line number Diff line
@@ -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...")
+1 −1
Original line number Diff line number Diff line
@@ -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()
    }
}