Skip to content

Commit

Permalink
Make the bearer token visible in FlightSqlServiceClient (#6254)
Browse files Browse the repository at this point in the history
* Make the bearer token visible in FlightSqlServiceClient

* Update client.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
  • Loading branch information
ccciudatu and alamb authored Aug 17, 2024
1 parent 042d725 commit 4a3422f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arrow-flight/src/sql/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4a3422f

Please sign in to comment.