Files
ClubPenguinServer/MareSynchronosServer/MareSynchronosShared/Utils/Configuration/AuthServiceConfiguration.cs
Stanley Dimant 7639066249 Split AuthService/Server
some refactoring
fix some stuff
add http context accessor
configure metrics as well
commit 713d054ccb965f7adb8eafa6e3fb52853a1e6dd2 (partial, Docker only)
2024-10-08 08:59:50 +00:00

27 lines
1005 B
C#

using System.Text;
namespace MareSynchronosShared.Utils.Configuration;
public class AuthServiceConfiguration : MareConfigurationBase
{
public string GeoIPDbCityFile { get; set; } = string.Empty;
public bool UseGeoIP { get; set; } = false;
public int FailedAuthForTempBan { get; set; } = 5;
public int TempBanDurationInMinutes { get; set; } = 5;
public List<string> WhitelistedIps { get; set; } = new();
public int RegisterIpLimit { get; set; } = 3;
public int RegisterIpDurationInMinutes { get; set; } = 10;
public override string ToString()
{
StringBuilder sb = new();
sb.AppendLine(base.ToString());
sb.AppendLine($"{nameof(GeoIPDbCityFile)} => {GeoIPDbCityFile}");
sb.AppendLine($"{nameof(UseGeoIP)} => {UseGeoIP}");
sb.AppendLine($"{nameof(RegisterIpLimit)} => {RegisterIpLimit}");
sb.AppendLine($"{nameof(RegisterIpDurationInMinutes)} => {RegisterIpDurationInMinutes}");
return sb.ToString();
}
}