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

[http-client-csharp] It is incorrect that OAuth2 authentication defined in the spec is silently ignored #5301

Closed
Tracked by #5207
ArcturusZhang opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@ArcturusZhang
Copy link
Member

Currently we do not support OAuth2 in unbranded client gen right now, and the current behavior in our code gen is to ignore it as if there is no auth (when only OAuth2 is defined).
This behavior is kind of incorrect - we generate wrong code and the user never gets a notification.

It also does not make sense if we throw exception whenever an OAuth2 authentication is defined - the user will never get a valid result or even a partial result so that they could make customization code to support such scenarios.

One possible solution for this is that we write a warning for this to inform the user that this is currently unsupported.

@JoshLove-msft
Copy link
Contributor

Closing as this was fixed - we report a warning if OAuth is defined in the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

No branches or pull requests

2 participants