[Question] Does NSwag client generation not generate OAuth 2 auth code? #4598
Unanswered
timmkrause
asked this question in
Q&A
Replies: 2 comments
-
@RicoSuter I was directed here searching for the same answer, though we are using apiKey type. Was really surprised to not see it in the generated code. |
Beta Was this translation helpful? Give feedback.
0 replies
-
no NSwag Studio does not automatically use O Auth out the box, the accepted approach to this is add a delegating handler to your http client that will query your identity server and set the bearer and user jwt tokens returned from the identity server. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are currently using the
PrepareRequest
hook to manually handle token acquisition, caching and injection and I was wondering if NSwag couldn't handle this for us as well.Based on
https://swagger.io/docs/specification/authentication/oauth2/
I was poking around with
which I have added manually to the spec to see what difference it makes to the generated client.
Actually the generated result is identical.
Is my assumption correct that NSwag does not support this?
Beta Was this translation helpful? Give feedback.
All reactions