Menu

Problems with authentication

2014-09-03
2014-09-10
  • Pablo Tapia

    Pablo Tapia - 2014-09-03

    Hi, I am having the following problem when I want to send a command

    java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object;

    my redis server has password

    AsyncRedisFactory f = new AsyncRedisFactory(null);
    AsyncRedisClient aredis = f.getClient("localhost");
    aredis.sendCommand(RedisCommand.AUTH, "pass1234");
    

    as I solve my problem of authentication?

     
  • Suresh Mahalingam

    Hi,

    I have added a static method setAuth to AsyncRedisFactory to set authentication for a server. Please try the below instead of sending AUTH command, after building the latest source with ant:

    AsyncRedisFactory.setAuth("localhost", "pass1234");
    AsyncRedisFactory f = new AsyncRedisFactory(null);
    AsyncRedisClient aredis = f.getClient("localhost");
    ...
    

    Regards,
    Suresh

     

Log in to post a comment.