MCPcopy Create free account
hub / github.com/apache/arrow / FromAccessToken

Method FromAccessToken

cpp/src/arrow/filesystem/gcsfs.cc:733–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731}
732
733GcsOptions GcsOptions::FromAccessToken(const std::string& access_token,
734 TimePoint expiration) {
735 GcsOptions options{};
736 options.credentials.holder_ = std::make_shared<internal::GcsCredentialsHolder>(
737 google::cloud::MakeAccessTokenCredentials(
738 access_token,
739 std::chrono::time_point_cast<std::chrono::system_clock::time_point::duration>(
740 expiration)));
741 options.credentials.access_token_ = access_token;
742 options.credentials.expiration_ = expiration;
743 options.scheme = "https";
744 return options;
745}
746
747GcsOptions GcsOptions::FromImpersonatedServiceAccount(
748 const GcsCredentials& base_credentials, const std::string& target_service_account) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected