Split AuthService/Server

some refactoring
fix some stuff
add http context accessor
configure metrics as well
commit 713d054ccb965f7adb8eafa6e3fb52853a1e6dd2 (partial, Docker only)
This commit is contained in:
Stanley Dimant
2024-05-06 14:05:24 +02:00
committed by Loporrit
parent c400d9746f
commit 7639066249
61 changed files with 593 additions and 120 deletions

View File

@@ -0,0 +1,26 @@
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();
}
}