redox icon indicating copy to clipboard operation
redox copied to clipboard

Using authentication through Subscriber

Open mfontanini opened this issue 10 years ago • 5 comments

I'm trying to perform authentication via the AUTH command. This works just fine through Redox but I can't do the same for Subscriber since it doesn't allow command execution.

Are there any plans to add this? For now I just forked the code and added a getter for the internal Redox inside the subscriber but it would be really nice if the upstream codebase supported this. Especially since I don't think it's such an odd request to be able to authenticate before subscribing to channels.

I can create a PR for this, just let me know how you would like to achieve this (exposing the Redox might not be so nice)

mfontanini avatar Jun 29 '15 18:06 mfontanini

Where is your fork with AUTH for Subscriber?

wegylexy avatar Jul 26 '18 05:07 wegylexy

I didn't even remember this. I probably have it somewhere in the company I work for's internal repos. I just moved over to using redis3m which has worked great, supports AUTH and never had an issue with it.

mfontanini avatar Jul 26 '18 16:07 mfontanini

With C++17, I don't want boost for basic stuff. Sneaked into the Subscriber code of Redox, it's using commandLoop internally, so I just set the loop interval to numeric_limits<double>::infinity(). I still look forward to a more modern and performant interface.

wegylexy avatar Jul 26 '18 17:07 wegylexy

So I've checked subscriber.hpp. I think by expose rdx_ member from private to public. Then use it carefully would solve the issue. Will create a PR soon with a more properly way to do the job.

ingjieye avatar Aug 13 '19 10:08 ingjieye

So I've just create a PR to do the job in a more properly way. https://github.com/hmartiro/redox/pull/63

ingjieye avatar Aug 14 '19 02:08 ingjieye