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

Missing overloads of RDSAuthTokenGenerator.GenerateAuthTokenAsync #3123

Open
Brads3290 opened this issue Dec 7, 2023 · 1 comment
Open
Labels
feature-request A feature should be added or improved. module/sdk-custom p2 This is a standard priority issue queued

Comments

@Brads3290
Copy link

Describe the bug

Overloads of GenerateAuthToken:

public static string GenerateAuthToken(string hostname, int port, string dbUser)
public static string GenerateAuthToken(RegionEndpoint region, string hostname, int port, string dbUser)
public static string GenerateAuthToken(AWSCredentials credentials, string hostname, int port, string dbUser)
public static string GenerateAuthToken(AWSCredentials credentials, RegionEndpoint region, string hostname, int port, string dbUser)

Overloads of GenerateAuthTokenAsync (only one):

public static async System.Threading.Tasks.Task<string> GenerateAuthTokenAsync(AWSCredentials credentials, RegionEndpoint region, string hostname, int port, string dbUser)

Expected Behavior

Should be able to use the same behaviours for both async and sync.

Current Behavior

As the async overload requires an AWSCredentials object, we currently need a work-around in order to generate an auth token in an async context without providing credentials (as they should be fetched from the environment)

await Task.Run(() => RDSAuthTokenGenerator.GenerateAuthToken(region, options.Host, options.Port, options.Username));

Reproduction Steps

Look in RDSAuthTokenGenerator.cs

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.RDS 3.7.301.10

Targeted .NET Platform

.NET 8

Operating System and version

MacOS 13.6.2

@Brads3290 Brads3290 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 7, 2023
@ashishdhingra
Copy link
Contributor

Converting this to feature request since the ask here is to add overloads for async versions to match with sync versions for better developer experience. Needs review with the team.

@ashishdhingra ashishdhingra added feature-request A feature should be added or improved. needs-review p2 This is a standard priority issue queued and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. needs-review labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/sdk-custom p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

2 participants