Google Cloud Storage C++ Client  1.42.0
A C++ Client Library for Google Cloud Storage
Classes | Namespaces | Functions
service_account_credentials.h File Reference
#include "google/cloud/storage/internal/curl_request_builder.h"
#include "google/cloud/storage/internal/openssl_util.h"
#include "google/cloud/storage/oauth2/credential_constants.h"
#include "google/cloud/storage/oauth2/credentials.h"
#include "google/cloud/storage/oauth2/refreshing_credentials_wrapper.h"
#include "google/cloud/storage/version.h"
#include "google/cloud/internal/sha256_hash.h"
#include "google/cloud/optional.h"
#include "google/cloud/status_or.h"
#include "absl/types/optional.h"
#include <chrono>
#include <condition_variable>
#include <ctime>
#include <iostream>
#include <mutex>
#include <set>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  google::cloud::storage::oauth2::ServiceAccountCredentialsInfo
 Object to hold information used to instantiate an ServiceAccountCredentials. More...
 
class  google::cloud::storage::oauth2::ServiceAccountCredentials< HttpRequestBuilderType, ClockType >
 Wrapper class for Google OAuth 2.0 service account credentials. More...
 

Namespaces

 google
 
 google::cloud
 
 google::cloud::storage
 Contains all the Google Cloud Storage C++ client APIs.
 
 google::cloud::storage::oauth2
 

Functions

StatusOr< ServiceAccountCredentialsInfo > google::cloud::storage::oauth2::ParseServiceAccountCredentials (std::string const &content, std::string const &source, std::string const &default_token_uri=GoogleOAuthRefreshEndpoint())
 Parses the contents of a JSON keyfile into a ServiceAccountCredentialsInfo. More...
 
StatusOr< ServiceAccountCredentialsInfo > google::cloud::storage::oauth2::ParseServiceAccountP12File (std::string const &source, std::string const &default_token_uri=GoogleOAuthRefreshEndpoint())
 Parses the contents of a P12 keyfile into a ServiceAccountCredentialsInfo. More...
 
StatusOr< RefreshingCredentialsWrapper::TemporaryToken > google::cloud::storage::oauth2::ParseServiceAccountRefreshResponse (storage::internal::HttpResponse const &response, std::chrono::system_clock::time_point now)
 Parses a refresh response JSON string and uses the current time to create a TemporaryToken. More...
 
std::pair< std::string, std::string > google::cloud::storage::oauth2::AssertionComponentsFromInfo (ServiceAccountCredentialsInfo const &info, std::chrono::system_clock::time_point now)
 Splits a ServiceAccountCredentialsInfo into header and payload components and uses the current time to make a JWT assertion. More...
 
std::string google::cloud::storage::oauth2::MakeJWTAssertion (std::string const &header, std::string const &payload, std::string const &pem_contents)
 Given a key and a JSON header and payload, creates a JWT assertion string. More...
 
std::string google::cloud::storage::oauth2::CreateServiceAccountRefreshPayload (ServiceAccountCredentialsInfo const &info, std::string const &grant_type, std::chrono::system_clock::time_point now)
 Uses a ServiceAccountCredentialsInfo and the current time to construct a JWT assertion. More...