Add OAuth bearer token refresh callback support#322
Open
kalavt wants to merge 2 commits intomfontanini:masterfrom
Open
Add OAuth bearer token refresh callback support#322kalavt wants to merge 2 commits intomfontanini:masterfrom
kalavt wants to merge 2 commits intomfontanini:masterfrom
Conversation
Change the oauthbearer_config parameter from 'const std::string&' to
'const std::string*' to maintain semantic consistency with librdkafka.
This allows the callback to distinguish between:
- Config not set (nullptr)
- Config set to empty string ('')
Updated files:
- include/cppkafka/configuration.h: Changed callback signature
- src/configuration.cpp: Modified proxy to pass nullptr instead of empty string
- examples/oauth_example.cpp: Updated example to check for nullptr
- docs/oauth_bearer_callback.md: Updated all documentation and examples
Addresses PR review comment from antaljanosbenjamin.
Author
|
@mfontanini would you pls review the changes, for add oauth refresh callback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for OAuth bearer token refresh callbacks, enabling authentication mechanisms like AWS MSK IAM, Azure Event Hubs, and custom OAuth implementations.
Changes:
Implementation Details:
The callback uses
const std::string*instead ofconst std::string&to maintain semantic consistency with librdkafka, allowing callers to distinguish between:Testing:
Includes complete example implementation in examples/oauth_example.cpp