Skip to content
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

RedisConfiguration missing the User property #513

Closed
WillGoGithub opened this issue Oct 23, 2022 · 3 comments
Closed

RedisConfiguration missing the User property #513

WillGoGithub opened this issue Oct 23, 2022 · 3 comments

Comments

@WillGoGithub
Copy link

WillGoGithub commented Oct 23, 2022

Describe the bug
According to this page StackExchange.Redis/Configuration there should have property "User" in the StackExchange.Redis.Extensions.Core.Configuration.RedisConfigService but not.

image

When redis server use ACL configured, would cause unable to connect.

To Reproduce
services.AddStackExchangeRedisExtensions(Configuration.GetSection("Redis").Get());

{
  "Redis": {
    "User": "username",
    "Password": "******",
    "Hosts": [
      {
        "Host": "******",
        "Port": "6379"
      }
    ]
  }
}

Expected behavior
Class RedisConfiguration can take property of "User" and join it into connection string.

Desktop (please complete the following information):

  • OS: Win11
  • Runtime version: .NET 6
  • Version: StackExchange.Redis.Extensions.Core 8.0.5.0

Additional context
Let me know I'm wrong if I miss something.

Thanks.

@WillGoGithub
Copy link
Author

WillGoGithub commented Nov 7, 2022 via email

@Avihailev
Copy link

have you tried using ConfigurationOptions inside of RedisConfiguration ?

@imperugo
Copy link
Owner

imperugo commented Mar 1, 2023

Hi @WillGoGithub
sorry for the delay.
For do what you want to do there are different ways:

  1. Use the connection string instead of the RedisConfiguration class. This allow you to specify all the parameters the main library (StackExhange.Redis) offers

  2. Use the ConfigurationOptions as suggested by @Avihailev

  3. Open a PR with the code, the tests and all the code you think is important for this library and I'll be happy to see it and merge if ok.

Finally, I just pushed the 9.0.1 that includes that parameter User into the RedisConfiguration so you have also the option 4 (but number 3 is still my favourite)

Thanks

@imperugo imperugo closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants