How to connect using username/password. #668
-
Hi guys, Im using go embeded system, and i tried the username/passwrod protection. I can confirm that both go clietn/server can work wtih username/password. But how to connect user nats.net on c#, the nats constructor, accepts a cred file but I want to specify usernaem and password, or possible encrypt it wtih bycrypt.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
you can also pass options for more complicated cases var opts = new NatsOpts
{
AuthOpts = new NatsAuthOpts
{
Username = "bob",
Password = "s3cr3t",
},
};
await using var client = new NatsClient(opts); |
Beta Was this translation helpful? Give feedback.
-
ty! |
Beta Was this translation helpful? Give feedback.
you can also pass options for more complicated cases