Closed panicfrog closed 4 years ago
Hello,
There's no specific support for Redis authentication in this library yet. There's no "connect with password" function, largely because in the use-cases to which it has currently been applied, there's been no need.
But it can still be used to connect to Redis servers that need a password by sending the AUTH command yourself. So something like:
let connection = client::paired_connect(&addr).await?;
match connection.send(resp_array!["AUTH", password]).await {
Ok(()) => println!("Authenticated"),
Err(e) => eprintln!("Error authenticating {}", e)
}
Although this might cause issues if the connection drops, the library will try to reconnect automatically, but the connection may need to be reauthenticated afterwards. But the best way of handling that depends on the structure of the application.
think you
i don't konw how to connect redis with password