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

[REQ] [csharp] Option to specify scopes when using OAuth Client Credentials flow #17047

Open
sgafoor195 opened this issue Nov 13, 2023 · 1 comment

Comments

@sgafoor195
Copy link

Is your feature request related to a problem? Please describe.

When using the OAuth client credentials flow, the Configuration object allows me to specify the OAuthTokenUrl, OAuthClientId, and OAuthClientSecret, but there seems to be no way to specify any scope. Problem I'm facing is that I need to specify a scope to retrieve a token, so currently the request made in the OAuthAuthenticator.cs (GetToken() method) class returns a 400 response.

Describe the solution you'd like

  1. An additional property in the Configuration class for specifying an OAuth scope
  2. The GetToken() method in OAuthAuthenticator.cs adds a scope parameter when making the request (if a scope has been specified)

Describe alternatives you've considered

Current workaround I'm attempting is adding custom code to override the AccessToken token property.

@mjansrud
Copy link
Contributor

mjansrud commented Jul 16, 2024

Any plan to implement this feature @OpenAPITools/generator-core-team / @wing328 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants