namespace StellaOps.Cryptography.Kms; /// /// Configuration for FIDO2-backed signing flows. /// public sealed class Fido2Options { private TimeSpan metadataCacheDuration = TimeSpan.FromMinutes(5); /// /// Gets or sets the relying party identifier (rpId) used when registering the credential. /// public string RelyingPartyId { get; set; } = string.Empty; /// /// Gets or sets the credential identifier (Base64Url encoded string). /// public string CredentialId { get; set; } = string.Empty; /// /// Gets or sets the PEM-encoded public key associated with the credential. /// public string PublicKeyPem { get; set; } = string.Empty; /// /// Gets or sets the timestamp when the credential was provisioned. /// public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow; /// /// Gets or sets the cache duration for metadata lookups. /// public TimeSpan MetadataCacheDuration { get => metadataCacheDuration; set => metadataCacheDuration = value <= TimeSpan.Zero ? TimeSpan.FromMinutes(5) : value; } /// /// Gets or sets an optional authenticator factory hook (mainly for testing or custom integrations). /// public Func? AuthenticatorFactory { get; set; } }