You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/10/13 04:36:58 UTC
[GitHub] [pulsar] BewareMyPower opened a new pull request #12341: [C++] Use URL encoded content type for OAuth 2.0 authentication
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower merged pull request #12341: [C++] Use URL encoded content type for OAuth 2.0 authentication
Posted by GitBox <gi...@apache.org>.
BewareMyPower merged pull request #12341:
URL: https://github.com/apache/pulsar/pull/12341
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower merged pull request #12341: [C++] Use URL encoded content type for OAuth 2.0 authentication
Posted by GitBox <gi...@apache.org>.
BewareMyPower merged pull request #12341:
URL: https://github.com/apache/pulsar/pull/12341
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org