-
Notifications
You must be signed in to change notification settings - Fork 70
Support the base64 encoded credentials for OAuth2 authentication #249
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
Merged
BewareMyPower
merged 1 commit into
apache:main
from
BewareMyPower:bewaremypower/oauth-url
Apr 17, 2023
Merged
Support the base64 encoded credentials for OAuth2 authentication #249
BewareMyPower
merged 1 commit into
apache:main
from
BewareMyPower:bewaremypower/oauth-url
Apr 17, 2023
Conversation
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
0e78632
to
3a8c6ba
Compare
3a8c6ba
to
17c4d25
Compare
@shibd You're right. I think we need to support this format. |
shibd
reviewed
Apr 14, 2023
It seems simple, can you include it in this PR? |
@shibd Thanks for your suggestions. I'm working on simplifying all test scripts into the |
Fixes apache/pulsar-client-python#101 ### Motivation Currently the `private_key` field of the JSON passed to `AuthOauth2` only represents the path to the file, we need to support passing the base64 encoded JSON string. ### Modifications - Add the util methods `encode` and `decode` in namespace `pulsar::base64` for base64 serialization. Then add `Base64Test.cc` for it. - Support the following URL representations for `private_key`: 1. `file:///path/to/key/file` 2. `data:application/json;base64,xxxx` - Add `Oauth2Test` and set up the test environment for it independently with a Docker compose file.
2d9ddde
to
8f03fa5
Compare
shibd
approved these changes
Apr 17, 2023
This was referenced Apr 24, 2023
BewareMyPower
added a commit
to BewareMyPower/pulsar-client-python
that referenced
this pull request
May 23, 2023
### Modifications Add tests to verify the changes of apache/pulsar-client-cpp#249 work for the Python client. Add docs to describe valid JSON fields used to create an `AuthenticationOauth2` instance.
merlimat
pushed a commit
to apache/pulsar-client-python
that referenced
this pull request
May 23, 2023
### Modifications Add tests to verify the changes of apache/pulsar-client-cpp#249 work for the Python client. Add docs to describe valid JSON fields used to create an `AuthenticationOauth2` instance.
4 tasks
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.
Fixes apache/pulsar-client-python#101
Motivation
Currently the
private_key
field of the JSON passed toAuthOauth2
only represents the path to the file, we need to support passing the base64 encoded JSON string.Modifications
encode
anddecode
in namespacepulsar::base64
for base64 serialization.private_key
:file:///path/to/key/file
data:application/json;base64,xxxx
Oauth2Test
and set up the test environment for it independently with a Docker compose file.Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)