lyndonb-bq commented on a change in pull request #8724:
URL: https://github.com/apache/arrow/pull/8724#discussion_r527981869



##########
File path: cpp/src/arrow/flight/client.cc
##########
@@ -993,6 +998,30 @@ class FlightClient::FlightClientImpl {
     return Status::OK();
   }
 
+  Status AuthenticateBasicToken(std::string username, std::string password,
+                                std::pair<std::string, std::string>* 
bearer_token) {
+    // Add bearer token factory to middleware so it can intercept the bearer 
token.
+    
middleware.push_back(std::make_shared<ClientBearerTokenFactory>(bearer_token));

Review comment:
       The raw pointer is unpopulated, so it's passed to the 
BearerTokenFactory's constructor, which stores it and populated it when it 
receives the bearer token. I could make the client pass the whole factory in 
with the bearer token already inside it, but it's more work and requires they 
understand what's going on more than they otherwise would need to.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to