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/10/11 16:29:07 UTC

[GitHub] [pulsar-client-cpp] BewareMyPower commented on a diff in pull request #37: Added option to set the method name for Basic authentication

BewareMyPower commented on code in PR #37:
URL: https://github.com/apache/pulsar-client-cpp/pull/37#discussion_r992546592


##########
lib/auth/AuthBasic.cc:
##########
@@ -96,11 +113,17 @@ AuthenticationPtr AuthBasic::create(ParamMap& params) {
     if (passwordIt == params.end()) {
         throw std::runtime_error("No password provided for basic provider");
     }
-
-    return create(usernameIt->second, passwordIt->second);
+    auto methodIt = params.find("method");

Review Comment:
   Could you add a test to cover this part that a param string is accepted? Like https://github.com/apache/pulsar-client-cpp/blob/829618d686c11217922c70b4e5ffba97559c7056/tests/AuthBasicTest.cc#L125



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