This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a3422febf Make the bearer token visible in FlightSqlServiceClient 
(#6254)
4a3422febf is described below

commit 4a3422febf3220827cae34d8480761558df657bf
Author: Costi Ciudatu <[email protected]>
AuthorDate: Sat Aug 17 12:52:08 2024 +0300

    Make the bearer token visible in FlightSqlServiceClient (#6254)
    
    * Make the bearer token visible in FlightSqlServiceClient
    
    * Update client.rs
    
    Co-authored-by: Andrew Lamb <[email protected]>
    
    ---------
    
    Co-authored-by: Andrew Lamb <[email protected]>
---
 arrow-flight/src/sql/client.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arrow-flight/src/sql/client.rs b/arrow-flight/src/sql/client.rs
index 9f9963c925..345254a63a 100644
--- a/arrow-flight/src/sql/client.rs
+++ b/arrow-flight/src/sql/client.rs
@@ -111,6 +111,11 @@ impl FlightSqlServiceClient<Channel> {
         self.token = None;
     }
 
+    /// Share the bearer token with potentially different `DoGet` clients
+    pub fn token(&self) -> Option<&String> {
+        self.token.as_ref()
+    }
+
     /// Set header value.
     pub fn set_header(&mut self, key: impl Into<String>, value: impl 
Into<String>) {
         let key: String = key.into();

Reply via email to