From f705d977ff74127b1951148e087576cdb414e4fc Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Mon, 11 Nov 2024 14:10:54 +0100 Subject: [PATCH] fix token auth --- src/nats.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nats.erl b/src/nats.erl index e61d4cc..c4b05b3 100644 --- a/src/nats.erl +++ b/src/nats.erl @@ -988,11 +988,11 @@ flush_batch(Data0) -> client_info(#{server_info := ServerInfo} = Data) -> %% Include user and name iff the server requires it - FieldsList = [verbose, pedantic, tls_required, auth_token, name, lang, + FieldsList = [verbose, pedantic, tls_required, name, lang, version, headers, no_responders], NewFieldsList = case maps:get(auth_required, ServerInfo, false) of - true -> [user, pass | FieldsList]; + true -> [user, pass, auth_token | FieldsList]; _ -> FieldsList end, Nats = maps:with(NewFieldsList, Data),