-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[CPP client]Fix the issuer_url parsing failure in oauth2 #7791
Merged
wolfstudy
merged 1 commit into
apache:master
from
wolfstudy:xiaolong/fix-oauth2-of-cpp-client
Aug 10, 2020
Merged
[CPP client]Fix the issuer_url parsing failure in oauth2 #7791
wolfstudy
merged 1 commit into
apache:master
from
wolfstudy:xiaolong/fix-oauth2-of-cpp-client
Aug 10, 2020
Conversation
This file contains 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
Signed-off-by: xiaolong.ran <rxl@apache.org>
jiazhai
approved these changes
Aug 10, 2020
aahmed-se
approved these changes
Aug 10, 2020
wolfstudy
added a commit
that referenced
this pull request
Aug 12, 2020
Signed-off-by: xiaolong.ran <rxl@apache.org> ### Motivation The `issuer_url` in the current cpp example needs to be suffixed with `/oauth/token`, otherwise it cannot be recognized correctly and the following error will be returned: ``` OAuth2 auth data: 2020-08-10 15:21:06.117 ERROR [0x10ff855c0] AuthOauth2:243 | Response failed for issuerurl https://cloud.streamnative.dev/oauth2/token. response Code 404 passedin: { "grant_type": "client_credentials", "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "audience": "urn:sn:pulsar:pi-ns:pi-name" } libc++abi.dylib: terminating with uncaught exception of type char const* ``` ### Modifications Add a fixed suffix of `/oauth/token` to issuer_url ### Verifying this change Fix test cases as follows: - testOauth2CredentialFile - testOauth2WrongSecret - testOauth2 (cherry picked from commit c88ba50)
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
Signed-off-by: xiaolong.ran <rxl@apache.org> ### Motivation The `issuer_url` in the current cpp example needs to be suffixed with `/oauth/token`, otherwise it cannot be recognized correctly and the following error will be returned: ``` OAuth2 auth data: 2020-08-10 15:21:06.117 ERROR [0x10ff855c0] AuthOauth2:243 | Response failed for issuerurl https://cloud.streamnative.dev/oauth2/token. response Code 404 passedin: { "grant_type": "client_credentials", "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "audience": "urn:sn:pulsar:pi-ns:pi-name" } libc++abi.dylib: terminating with uncaught exception of type char const* ``` ### Modifications Add a fixed suffix of `/oauth/token` to issuer_url ### Verifying this change Fix test cases as follows: - testOauth2CredentialFile - testOauth2WrongSecret - testOauth2
lbenc135
pushed a commit
to lbenc135/pulsar
that referenced
this pull request
Sep 5, 2020
Signed-off-by: xiaolong.ran <rxl@apache.org> ### Motivation The `issuer_url` in the current cpp example needs to be suffixed with `/oauth/token`, otherwise it cannot be recognized correctly and the following error will be returned: ``` OAuth2 auth data: 2020-08-10 15:21:06.117 ERROR [0x10ff855c0] AuthOauth2:243 | Response failed for issuerurl https://cloud.streamnative.dev/oauth2/token. response Code 404 passedin: { "grant_type": "client_credentials", "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "audience": "urn:sn:pulsar:pi-ns:pi-name" } libc++abi.dylib: terminating with uncaught exception of type char const* ``` ### Modifications Add a fixed suffix of `/oauth/token` to issuer_url ### Verifying this change Fix test cases as follows: - testOauth2CredentialFile - testOauth2WrongSecret - testOauth2
lbenc135
pushed a commit
to lbenc135/pulsar
that referenced
this pull request
Sep 5, 2020
Signed-off-by: xiaolong.ran <rxl@apache.org> ### Motivation The `issuer_url` in the current cpp example needs to be suffixed with `/oauth/token`, otherwise it cannot be recognized correctly and the following error will be returned: ``` OAuth2 auth data: 2020-08-10 15:21:06.117 ERROR [0x10ff855c0] AuthOauth2:243 | Response failed for issuerurl https://cloud.streamnative.dev/oauth2/token. response Code 404 passedin: { "grant_type": "client_credentials", "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "audience": "urn:sn:pulsar:pi-ns:pi-name" } libc++abi.dylib: terminating with uncaught exception of type char const* ``` ### Modifications Add a fixed suffix of `/oauth/token` to issuer_url ### Verifying this change Fix test cases as follows: - testOauth2CredentialFile - testOauth2WrongSecret - testOauth2
lbenc135
pushed a commit
to lbenc135/pulsar
that referenced
this pull request
Sep 5, 2020
Signed-off-by: xiaolong.ran <rxl@apache.org> ### Motivation The `issuer_url` in the current cpp example needs to be suffixed with `/oauth/token`, otherwise it cannot be recognized correctly and the following error will be returned: ``` OAuth2 auth data: 2020-08-10 15:21:06.117 ERROR [0x10ff855c0] AuthOauth2:243 | Response failed for issuerurl https://cloud.streamnative.dev/oauth2/token. response Code 404 passedin: { "grant_type": "client_credentials", "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "audience": "urn:sn:pulsar:pi-ns:pi-name" } libc++abi.dylib: terminating with uncaught exception of type char const* ``` ### Modifications Add a fixed suffix of `/oauth/token` to issuer_url ### Verifying this change Fix test cases as follows: - testOauth2CredentialFile - testOauth2WrongSecret - testOauth2
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.
Signed-off-by: xiaolong.ran rxl@apache.org
Motivation
The
issuer_url
in the current cpp example needs to be suffixed with/oauth/token
, otherwise it cannot be recognized correctly and the following error will be returned:Modifications
Add a fixed suffix of
/oauth/token
to issuer_urlVerifying this change
Fix test cases as follows: