Skip to content

How to handle OAuth2 for generated C# client code? #3209

Answered by baywet
steingran asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for your interest in kiota and for reaching out. Here is some documentation about the authentication and authorization concepts for Kiota clients.
We provide default implementations you're welcomed to use if they match your scenario. It doesn't seem to be the case though, so you'll probably need to implement the token acquisition through:

  1. implementing IAccessTokenProvider (you should use a library like IdentityModel to make things easier here)
  2. deriving from BaseBearerAuthenticationProvider
  3. (optionally) open-source your authentication provider and release it to nuget.org so others can benefit from it, if you're willing to maintain it on the long run.

Let us know if you have furthe…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@steingran
Comment options

Answer selected by steingran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants