-
Hello, I'd like to know if it's possible to use this package with Redis Authentication?
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
This is a little bit tricky. Yes, it's possible, but it it currently isn't that easy. We would need to add a hook here: async-redis/lib/async/redis/client.rb Line 139 in 509ea5e This should do the authentication and any other setup (i.e. select database). |
Beta Was this translation helpful? Give feedback.
-
What you could do is this:
|
Beta Was this translation helpful? Give feedback.
-
It looks like our AUTH implementation might need an optional username: |
Beta Was this translation helpful? Give feedback.
-
Okay, I released |
Beta Was this translation helpful? Give feedback.
-
I'm guessing this is just meant to be psuedo code? Couple things I'm running into... The As written, I get: NoMethodError: undefined method `auth' for Async::Redis::Protocol::RESP2:Module Looking at the implementation maybe we're missing NoMethodError: undefined method `auth' for #<Async::Redis::Protocol::RESP2::Connection:0x0000556f3c619148 |
Beta Was this translation helpful? Give feedback.
-
Here is a working example: https://github.com/socketry/async-redis/blob/master/examples/auth/protocol.rb |
Beta Was this translation helpful? Give feedback.
Here is a working example:
https://github.com/socketry/async-redis/blob/master/examples/auth/protocol.rb