namespace SharepointToolbox.Web.Services.Auth;
///
/// Public material of a freshly generated app-only certificate. The private key is already
/// stored (encrypted) in the cert store; these fields are what the app registration needs
/// to trust the certificate as a sign-in credential.
///
/// SHA-1 thumbprint of the generated certificate.
/// Base64 of the DER-encoded public certificate (Graph keyCredential.key).
/// Validity start (UTC).
/// Validity end (UTC).
public record CertProvisioningResult(
string Thumbprint,
string PublicCertBase64,
DateTimeOffset NotBefore,
DateTimeOffset NotAfter);
///
/// Generates a self-signed certificate for a client profile, stores the private key in the
/// app-only cert store, and returns the public material to register against the Entra app.
///
public interface ICertProvisioningService
{
Task GenerateAndStoreAsync(string profileId, string subjectName, CancellationToken ct = default);
}