scala-redis-nb
scala-redis-nb copied to clipboard
Using passwordAuthentication for url based authentication
Authenticator.setDefault(new Auth(username, password)) is not working for secured url access. (i.e. RedisToGo hosted service url is something like redis://username:[email protected]:port)
Is there any workaround for this?
Let me have a look at it over the weekend. Thanks for reporting.
Any update on this?
Unfortunately not yet done .. will take a shot at the earliest.
Is there a solution for setting the password in the RedisClient? I'm using 0.7 and don't see any password variable there
Unfortunately it fell through the cracks :-( .. I will try to take a look over the weekend.
Thanks, much appreciated!
Just see that I could just use the auth command. Maybe that suffices?
auth
command is usable, as it's one of the APIs supported now (https://github.com/debasishg/scala-redis-nb/blob/master/src/main/scala/com/redis/api/ConnectionOperations.scala#L26) .. Let me know if this works for you. Or you are looking for something else ..
After looking at what would be involved, it would be nice if the RedisClient could accept the secret/password and send the auth command on connect. Would it be a lot to implement this?
The problem is to run any command from within RedisClient
I need to get hold of an ActorSystem
, ExecutionContext
and things like that.
If I were to use the auth
command in my own code, have you any suggestions about best practice? Does the auth 'session' time out? If so then wouldn't I need to catch some kind of exception and retry the auth
command while buffering the mongo requests in the mean time?
Use auth
just like any other command. The timeout is handled by an entry in redis.conf
named timeout
- setting it to 0
will disable the timeout between the client and the server.