feat: enforce jwt allowed connection types with go-compatible semantics

This commit is contained in:
Joseph Doherty
2026-02-23 05:43:46 -05:00
parent e562077e4c
commit 4a242f614f
4 changed files with 56 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
using System.Security.Cryptography.X509Certificates;
using NATS.Server.Auth.Jwt;
using NATS.Server.Protocol;
namespace NATS.Server.Auth;
@@ -19,5 +20,5 @@ public sealed class ClientAuthContext
/// Used by JWT authenticator to enforce allowed_connection_types claims.
/// Defaults to "STANDARD" for regular NATS client connections.
/// </summary>
public string ConnectionType { get; init; } = "STANDARD";
public string ConnectionType { get; init; } = JwtConnectionTypes.Standard;
}