 989046da13
			
		
	
	989046da13
	
	
	
		
			
			fix bug more logging fix logging wtf is going on even handle lists in config log output do not set "*" as default continent do not rely on "*" being present in configuration when picking file shard
		
			
				
	
	
		
			33 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Text;
 | |
| 
 | |
| namespace MareSynchronosShared.Utils;
 | |
| 
 | |
| public class MareConfigurationAuthBase : MareConfigurationBase
 | |
| {
 | |
|     [RemoteConfiguration]
 | |
|     public int FailedAuthForTempBan { get; set; } = 5;
 | |
|     [RemoteConfiguration]
 | |
|     public int TempBanDurationInMinutes { get; set; } = 5;
 | |
|     [RemoteConfiguration]
 | |
|     public int RegisterIpLimit { get; set; } = 3;
 | |
|     [RemoteConfiguration]
 | |
|     public int RegisterIpDurationInMinutes { get; set; } = 10;
 | |
|     [RemoteConfiguration]
 | |
|     public List<string> WhitelistedIps { get; set; } = new();
 | |
|     [RemoteConfiguration]
 | |
|     public bool UseGeoIP { get; set; } = false;
 | |
| 
 | |
|     public override string ToString()
 | |
|     {
 | |
|         StringBuilder sb = new();
 | |
|         sb.AppendLine(base.ToString());
 | |
|         sb.AppendLine($"{nameof(FailedAuthForTempBan)} => {FailedAuthForTempBan}");
 | |
|         sb.AppendLine($"{nameof(TempBanDurationInMinutes)} => {TempBanDurationInMinutes}");
 | |
|         sb.AppendLine($"{nameof(RegisterIpLimit)} => {RegisterIpLimit}");
 | |
|         sb.AppendLine($"{nameof(RegisterIpDurationInMinutes)} => {RegisterIpDurationInMinutes}");
 | |
|         sb.AppendLine($"{nameof(Jwt)} => {Jwt}");
 | |
|         sb.AppendLine($"{nameof(WhitelistedIps)} => {string.Join(", ", WhitelistedIps)}");
 | |
|         sb.AppendLine($"{nameof(UseGeoIP)} => {UseGeoIP}");
 | |
|         return sb.ToString();
 | |
|     }
 | |
| } |