benashford / redis-async-rs

A Rust client for Redis, using Tokio
Apache License 2.0
253 stars 30 forks source link

Authentication #18

Open gencer opened 6 years ago

gencer commented 6 years ago

How do you handle authentication using this library? In most cases redis is protected by password for safety.

I would like to know how we handle authentication.

benashford commented 6 years ago

At present there's no specific support for this. But individual applications can send an AUTH command explicitly when opening a connection.

This can be cumbersome depending on the nature of the work being done, so I'll leave this issue open and tag it as a feature request, as it would make sense to handle this as a convenience when opening (and re-opening) connections.

gencer commented 6 years ago

Thanks'! I'll keep my eyes on this.

akhilman commented 5 years ago

Perhaps authentication could be done by passing a function as argument to connect/paired_connect. This function will be called every time after connecting/reconnecting and before sending any other commands to server. In this function we can call AUTH, SELECT (change database number) and even upload lua scripts.

joe-at-startupmedia commented 3 years ago

https://github.com/benashford/redis-async-rs/issues/49