The readme.md file states you should pass the authentication parameters like so (as atoms):
nats_conf = %{host: "some-host", port: 3222, auth: %{ user: "some-user", pass: "some-pass"}}
If you try to do this, the app will blow up since the json encoder cannot handle atoms:
Interestingly, if you look into the tests they set the auth parameters differently:
opts = %{ auth: %{ "user" => "user", "pass" => "pass"}, }
So, the encoder needs to handle atoms correctly, or the readme.md needs to be changed to reflect how to pass the arguments correctly.
P.S. why not add an example with auth_token as well to the readme.md?
The readme.md file states you should pass the authentication parameters like so (as atoms):
nats_conf = %{host: "some-host", port: 3222, auth: %{ user: "some-user", pass: "some-pass"}}
If you try to do this, the app will blow up since the json encoder cannot handle atoms:
Interestingly, if you look into the tests they set the auth parameters differently:
opts = %{ auth: %{ "user" => "user", "pass" => "pass"}, }
So, the encoder needs to handle atoms correctly, or the readme.md needs to be changed to reflect how to pass the arguments correctly.
P.S. why not add an example with
auth_token
as well to the readme.md?