| 731 | } |
| 732 | |
| 733 | GcsOptions 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 | |
| 747 | GcsOptions GcsOptions::FromImpersonatedServiceAccount( |
| 748 | const GcsCredentials& base_credentials, const std::string& target_service_account) { |
nothing calls this directly
no outgoing calls
no test coverage detected