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 2022/06/06 09:31:40 UTC

[GitHub] [pulsar] BewareMyPower commented on pull request #15928: [fix][auth] Generate correct well-known OpenID configuration URL

BewareMyPower commented on PR #15928:
URL: https://github.com/apache/pulsar/pull/15928#issuecomment-1147251581

   Please apply the following patch to fix the code format.
   
   ```diff
   diff --git a/pulsar-client-cpp/lib/auth/AuthOauth2.cc b/pulsar-client-cpp/lib/auth/AuthOauth2.cc
   index 4bc5e8c814b2..c7f944da75b1 100644
   --- a/pulsar-client-cpp/lib/auth/AuthOauth2.cc
   +++ b/pulsar-client-cpp/lib/auth/AuthOauth2.cc
   @@ -143,9 +143,7 @@ ClientCredentialFlow::ClientCredentialFlow(ParamMap& params)
          audience_(params["audience"]),
          scope_(params["scope"]) {}
    
   -std::string ClientCredentialFlow::getTokenEndPoint() const {
   -    return tokenEndPoint_;
   -}
   +std::string ClientCredentialFlow::getTokenEndPoint() const { return tokenEndPoint_; }
    
    static size_t curlWriteCallback(void* contents, size_t size, size_t nmemb, void* responseDataPtr) {
        ((std::string*)responseDataPtr)->append((char*)contents, size * nmemb);
   @@ -177,7 +175,7 @@ void ClientCredentialFlow::initialize() {
            wellKnownUrl.pop_back();
        }
        wellKnownUrl.append("/.well-known/openid-configuration");
   -    curl_easy_setopt(handle, CURLOPT_URL,wellKnownUrl.c_str());
   +    curl_easy_setopt(handle, CURLOPT_URL, wellKnownUrl.c_str());
    
        // Write callback
        curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, curlWriteCallback);
   ```


-- 
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