namespace FruitBank.Common.Services;
///
/// Service for securely storing and retrieving user credentials.
/// Platform-specific implementations handle the actual secure storage.
///
public interface ISecureCredentialService
{
///
/// Saves the user credentials securely with a 2-day expiration from now.
///
Task SaveCredentialsAsync(string email, string password);
///
/// Retrieves the stored credentials if they exist and haven't expired.
/// Returns null if no credentials are stored or if they have expired.
///
Task GetCredentialsAsync();
///
/// Clears all stored credentials (used on logout).
///
Task ClearCredentialsAsync();
}
///
/// Represents stored user credentials.
///
public sealed record StoredCredentials(string Email, string Password);