feat: add auth model types (User, NKeyUser, Permissions) and auth config to NatsOptions

This commit is contained in:
Joseph Doherty
2026-02-22 22:21:00 -05:00
parent 11dc5e62f3
commit 5305069dd8
5 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
using NATS.Server;
using NATS.Server.Auth;
namespace NATS.Server.Tests;
public class AuthConfigTests
{
[Fact]
public void NatsOptions_has_auth_fields_with_defaults()
{
var opts = new NatsOptions();
opts.Username.ShouldBeNull();
opts.Password.ShouldBeNull();
opts.Authorization.ShouldBeNull();
opts.Users.ShouldBeNull();
opts.NKeys.ShouldBeNull();
opts.NoAuthUser.ShouldBeNull();
opts.AuthTimeout.ShouldBe(TimeSpan.FromSeconds(1));
}
}