Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to authenticate in the connection? #57

Closed
Gabsop opened this issue Mar 8, 2022 · 1 comment
Closed

How to authenticate in the connection? #57

Gabsop opened this issue Mar 8, 2022 · 1 comment

Comments

@Gabsop
Copy link
Contributor

Gabsop commented Mar 8, 2022

image
I'm trying to connect to the Redis but I have no idea how do I put my username and password to enter with TLS.

@ra1u
Copy link
Owner

ra1u commented Mar 8, 2022

First command you send should be auth.

conn.connectSecure(<args>).than((Command command){
     command.send_object(["AUTH","username","password"])
     .then((var response) {
       print(response);
       command.send_object(["SET","token","value]).then(
          (var response) => print(response));
     });
});

Or equivalently using async

Command command = await conn.connectSecure(<args>);
var rsp_auth = await command.send_object(["AUTH","username","password"]);
print(rsp_auth);
var rsp_token = await command.send_object((["SET","token","value]));
print(rsp_token);

I did not compile this, so let me know how this works for you.

Repository owner locked and limited conversation to collaborators Mar 8, 2022
@ra1u ra1u converted this issue into discussion #58 Mar 8, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants