BewareMyPower opened a new pull request #12341: URL: https://github.com/apache/pulsar/pull/12341
Fixes #12334 ### Motivation When C++ client sends a HTTP request for the access token from a OAuth 2.0 server, the content type is JSON, which is incorrect and might not work in some cases. ### Modifications - Replace `generateJsonBody` with `generateParamMap` to create a map that contains the necessary keys from `CredentialsFlow`. - Add a `buildClientCredentialsBody` method to convert the map to URL encoded string. - Change the content type from `json` to `x-www-form-urlencoded`. ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change is already covered by existing tests, such as `AuthPluginTest.testOauth2RequestBody`. This PR changes the test to verify `generateParamMap` because `generateJsonBody` is removed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
