diff --git a/addons/SysApi/SysApiConnector.cs b/addons/SysApi/SysApiConnector.cs index 57be4d1b..a4ca5b3a 100644 --- a/addons/SysApi/SysApiConnector.cs +++ b/addons/SysApi/SysApiConnector.cs @@ -104,9 +104,16 @@ public sealed class SysApiConnector : ServiceConnector ex.GetType().Name); } } + // Completely independent authorization from the general portal token. + // Portal payouts fail closed unless a dedicated credential is explicitly configured. + var moneyBridge = new SysApiNvMoney( + accounts, cfg.GetBoolean("MoneyAdminEnabled", false), + cfg.GetBoolean("MoneyPortalEnabled", false), + cfg.GetInt("MoneyMaxNvPerPayout", 10000), + Environment.GetEnvironmentVariable("OGL_SYSAPI_MONEY_PORTAL_TOKEN") ?? ""); var host = new SysApiHost(port, publicOrigin, accounts, authentication, token, readModel, policyStore, policyReadToken, residentGateway, adminData, - alertPublisher); + alertPublisher, moneyBridge); host.Start(); _host = host; Log.InfoFormat("[SYS.API] Foundation active on loopback 127.0.0.1:{0}; public TLS proxy port 8850 requires ACME certificate.", port);