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.
/// When not set, the Fido2KmsClient will use the current time via TimeProvider.
///
public DateTimeOffset? CreatedAt { get; set; }
///
/// Gets or sets the cache duration for metadata lookups.
///
public TimeSpan MetadataCacheDuration
{
get => _metadataCacheDuration;
set => _metadataCacheDuration = value <= TimeSpan.Zero ? TimeSpan.FromMinutes(5) : value;
}
}