local password = json_string["password"] or "None"
local redisPassword = red:hmget(userName,"password") or None
local redisAuthtoken = red:hmget(userName,"authToken")
if (tostring(password) == tostring(redisPassword))
then
ngx.say(redisAuthtoken)
else
ngx.say("Error User or Service Not found 1510")
end
password = admin redisPassword = admin
i am able to see both password as output admin but it is not matching in lua code and control always going to else part.
when i am comparing like this
if (tostring(password) == "admin" )
it is working fine which means the issue is with the redis value but i have set password value admin in redis.
Nonecontain?