-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding username as parameter for the redis authentication #65
base: master
Are you sure you want to change the base?
Conversation
if username != "" { | ||
if _, err := c.Do("AUTH", password); err != nil { | ||
c.Close() | ||
return nil, err | ||
} | ||
} else { | ||
if _, err := c.Do("AUTH", username, password); err != nil { | ||
c.Close() | ||
return nil, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You switched the call in the condition:
- empty
username
calls the command using theusername
variable - a non-empty
username
calls the command without using theusername
variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry for the mistaken.
I don't think this PR will be accepted by the author.
The repo is inactive for such a long time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides, I suggest that using tcp link url to include username and database index is the trick to pass through this dilemma if your library is dependent on redistore
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry for the mistaken.
I don't think this PR will be accepted by the author.
The repo is inactive for such a long time.
Yes, I am of the same opinion. Perhaps an authentik should use a different library than this one if we want to implement modern Redis features.
Intention
I am using Authentik which is using your library. There is an open ticket for settings the Redis username. Sadly the username is not set in this library. Without fixing that issuer here, it's impossible to fix it in Authentik. ^^"
Changes
Adding the username as optional parameter.
I hope the PR is looking good, I am not a go developer. Please let me know if something is wrong/missing.