blob: fee3157959bc7c93b092888b0c81e5869c92904a [file] [log] [blame]
package com.android.car.debuggingrestrictioncontroller.data;
import com.android.car.debuggingrestrictioncontroller.data.model.LoggedInUser;
import java.io.IOException;
/**
* Class that handles authentication w/ login credentials and retrieves user information.
*/
public class LoginDataSource {
public Result<LoggedInUser> login(String username, String password) {
try {
// TODO: handle loggedInUser authentication
LoggedInUser fakeUser =
new LoggedInUser(
java.util.UUID.randomUUID().toString(),
"Jane Doe");
return new Result.Success<>(fakeUser);
} catch (Exception e) {
return new Result.Error(new IOException("Error logging in", e));
}
}
public void logout() {
// TODO: revoke authentication
}
}