mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 18:15:41 +00:00
18 lines
725 B
C#
18 lines
725 B
C#
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace Spacebar.Interop.Authentication;
|
|
|
|
public class SpacebarAuthenticationConfiguration {
|
|
public SpacebarAuthenticationConfiguration(IConfiguration configuration) {
|
|
configuration.GetRequiredSection("Spacebar").GetRequiredSection("Authentication").Bind(this);
|
|
}
|
|
|
|
public required string PrivateKeyPath { get; set; }
|
|
public required string PublicKeyPath { get; set; }
|
|
|
|
public string? OverrideUid { get; set; }
|
|
public string? OverrideDid { get; set; }
|
|
public bool DisableAuthentication { get; set; } = false;
|
|
public bool Enforce2FA { get; set; } = true;
|
|
public TimeSpan AuthCacheExpiry { get; set; } = TimeSpan.FromSeconds(30);
|
|
} |