using System.ComponentModel.DataAnnotations;

namespace Tiku.Api.Options;

public sealed class AuthRateLimitOptions
{
    public const string SectionName = "RateLimiting:Authentication";

    [Range(1, 100)]
    public int PasswordPermitLimit { get; set; } = 5;

    [Range(1, 86_400)]
    public int PasswordWindowSeconds { get; set; } = 900;

    [Range(1, 100)]
    public int SmsPermitLimit { get; set; } = 5;

    [Range(1, 86_400)]
    public int SmsWindowSeconds { get; set; } = 300;

}

public static class AuthRateLimitPolicies
{
    public const string Password = "auth-password";
    public const string Sms = "auth-sms";
}
