-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[csharp] Add scope for oauth2 #19175
Conversation
thanks for the PR. can you please review the test failures when you've time? |
This reverts commit f051f26.
…to csharp-oauth-scope
I added LangVersion 8 to enable nullable strings in the |
can it be avoided if possible? |
…to csharp-oauth-scope
looks like some samples are not yet up-to-date: https://github.com/OpenAPITools/openapi-generator/actions/runs/9970910212/job/27553889552?pr=19175 can you please regenerate the samples when you've time? |
Ive updated the samples @wing328 |
modules/openapi-generator/src/main/resources/csharp/Configuration.mustache
Outdated
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache
Outdated
Show resolved
Hide resolved
Ive changed to {{nrt?}} as requested @devhl-labs. Does it look ok? And can one of you please generate the samples for me? That would be much appreciated @wing328 @devhl-labs. Upon test generation i get a deviation from main, and have to change the code manually, which is a real pain. |
@wing328 can you run the last tests and take a final look? |
can you please update the samples? |
Hi Wing. Did you see comment #19175 (comment)? |
filed #19234 with updated samples. let's see how that goes |
[csharp] Add scope for oauth2 based on issue #17047.
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.
Microsoft identity platform documentation:
https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming 7.6.0 minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)@iBicha