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] [Rust] [Client] Better integration with token source providers #19648

Open
nicolas-vivot opened this issue Sep 23, 2024 · 0 comments
Open

Comments

@nicolas-vivot
Copy link
Contributor

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

Currently the only way to provide authentication tokens are by providing it directly with an option.
This is not super friendly as it forces us to deal with the token management specifically outside the client, and recreate a new configuration every time a token get renewed.

Of course, it is not the responsibility of the generated client to deal with this, but we can offer a better integration between the two, so that developers does not necessarily need to DIY it.

Describe the solution you'd like

To improve the integration with token source providers in rust:

  • add a new option to activate this mode (as a replacement of the current token attributes in the configuration)
  • use that when setting the authorization header in requests

Important: A token source MUST be async, which restrict this mode to async clients. For sync client, the current configuration way will be kept.

Describe alternatives you've considered

Additional context

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

1 participant