34 #ifndef GRPCXX_CREDENTIALS_H
35 #define GRPCXX_CREDENTIALS_H
39 #include <grpc++/config.h>
40 #include <grpc++/impl/grpc_library.h>
43 class ChannelArguments;
44 class ChannelInterface;
45 class SecureCredentials;
50 virtual bool ApplyToCall(
grpc_call* call) = 0;
53 friend std::shared_ptr<Credentials> CompositeCredentials(
54 const std::shared_ptr<Credentials>& creds1,
55 const std::shared_ptr<Credentials>& creds2);
57 virtual SecureCredentials* AsSecureCredentials() = 0;
60 friend std::shared_ptr<ChannelInterface> CreateChannel(
61 const grpc::string& target,
const std::shared_ptr<Credentials>& creds,
64 virtual std::shared_ptr<ChannelInterface> CreateChannel(
78 grpc::string pem_root_certs;
79 grpc::string pem_private_key;
80 grpc::string pem_cert_chain;
90 std::shared_ptr<Credentials> GoogleDefaultCredentials();
93 std::shared_ptr<Credentials> SslCredentials(
97 std::shared_ptr<Credentials> ComputeEngineCredentials();
105 std::shared_ptr<Credentials> ServiceAccountCredentials(
106 const grpc::string& json_key,
const grpc::string& scope,
107 long token_lifetime_seconds);
114 std::shared_ptr<Credentials> JWTCredentials(
const grpc::string& json_key,
115 long token_lifetime_seconds);
120 std::shared_ptr<Credentials> RefreshTokenCredentials(
121 const grpc::string& json_refresh_token);
124 std::shared_ptr<Credentials> IAMCredentials(
125 const grpc::string& authorization_token,
126 const grpc::string& authority_selector);
129 std::shared_ptr<Credentials> CompositeCredentials(
130 const std::shared_ptr<Credentials>& creds1,
131 const std::shared_ptr<Credentials>& creds2);
134 std::shared_ptr<Credentials> InsecureCredentials();
138 #endif // GRPCXX_CREDENTIALS_H
Definition: channel_arguments.h:51
Definition: credentials.h:77
Definition: credentials.h:47
Definition: grpc_library.h:41