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.
Answered by
mtmk
Oct 29, 2024
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.
0 replies
Answer selected by
ghostidentity
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can also pass options for more complicated cases