feat: port session 11 — Accounts & Directory JWT Store
- Account: full Account class (200 features) with subject mappings, connection counting, export/import checks, expiration timers - DirJwtStore: directory-based JWT storage with sharding and expiry - AccountResolver: IAccountResolver, MemoryAccountResolver, UrlAccountResolver, DirAccountResolver, CacheDirAccountResolver - AccountTypes: all supporting types (AccountLimits, SConns, ExportMap, ImportMap, ServiceExport, StreamExport, ServiceLatency, etc.) - 34 unit tests (599 total), 234 features complete (IDs 150-349, 793-826)
This commit is contained in:
@@ -671,8 +671,15 @@ public sealed partial class NatsServer
|
||||
{
|
||||
if (_accResolver == null)
|
||||
return (string.Empty, ServerErrors.ErrNoAccountResolver);
|
||||
var (jwt, err) = _accResolver.Fetch(name);
|
||||
return (jwt, err);
|
||||
try
|
||||
{
|
||||
var jwt = _accResolver.FetchAsync(name).GetAwaiter().GetResult();
|
||||
return (jwt, null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (string.Empty, ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user