Add one-command server and client bootstraps

This commit is contained in:
2026-09-03 16:34:21 -06:00
parent 742ae9c2b5
commit 3a10098239
19 changed files with 1569 additions and 37 deletions
@@ -0,0 +1,31 @@
using SGU.AuthBroker.Options;
using Xunit;
namespace SGU.AuthBroker.Tests;
public sealed class BrokerOptionsTests
{
[Fact]
public void ValidateAllowsAnEmptyClientAllowListDuringServerBootstrap()
{
BrokerOptions options = new();
options.Validate();
}
[Fact]
public void ValidateRejectsAnInvalidConfiguredClientThumbprint()
{
BrokerOptions options = new()
{
Tls = new TlsOptions
{
AllowedClientThumbprints = ["not-a-thumbprint"]
}
};
InvalidOperationException exception = Assert.Throws<InvalidOperationException>(options.Validate);
Assert.Contains("thumbprint", exception.Message, StringComparison.OrdinalIgnoreCase);
}
}