using IronLicensing.Client.Models;
namespace IronLicensing.Client;
public interface ILicenseCache
{
///
/// Gets the cached license information
///
Task GetCachedLicenseAsync();
///
/// Saves license information with optional signature for offline verification
///
Task SaveLicenseAsync(LicenseInfo license, string? signature, string? signingPublicKey);
///
/// Clears all cached license data
///
Task ClearAsync();
///
/// Gets the cached signing public key
///
Task GetSigningPublicKeyAsync();
///
/// Saves the signing public key
///
Task SaveSigningPublicKeyAsync(string publicKey);
}
///
/// Cached license data including signature for offline verification
///
public class CachedLicenseData
{
public LicenseInfo License { get; set; } = null!;
public string? Signature { get; set; }
public string? SigningPublicKey { get; set; }
public string? RawLicenseJson { get; set; }
}