Go to the documentation of this file.
19 #ifndef GRPCPP_SECURITY_CREDENTIALS_H
20 #define GRPCPP_SECURITY_CREDENTIALS_H
40 class SecureCallCredentials;
41 class SecureChannelCredentials;
46 const std::shared_ptr<grpc::ChannelCredentials>& creds,
49 namespace experimental {
52 const std::shared_ptr<grpc::ChannelCredentials>& creds,
55 std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
56 interceptor_creators);
59 "Use grpc::XdsCredentials instead. The experimental version will be "
60 "deleted after the 1.41 release.")
82 const std::shared_ptr<ChannelCredentials>& channel_creds,
83 const std::shared_ptr<CallCredentials>&
call_creds);
90 const std::shared_ptr<ChannelCredentials>& fallback_creds);
97 const std::shared_ptr<grpc::ChannelCredentials>& creds,
100 friend std::shared_ptr<grpc::Channel>
103 const std::shared_ptr<grpc::ChannelCredentials>& creds,
105 std::vector<std::unique_ptr<
107 interceptor_creators);
109 virtual std::shared_ptr<Channel> CreateChannelImpl(
116 std::vector<std::unique_ptr<
140 return "CallCredentials did not provide a debug string";
145 const std::shared_ptr<ChannelCredentials>& channel_creds,
146 const std::shared_ptr<CallCredentials>&
call_creds);
149 const std::shared_ptr<CallCredentials>& creds1,
150 const std::shared_ptr<CallCredentials>& creds2);
245 const std::shared_ptr<ChannelCredentials>& channel_creds,
246 const std::shared_ptr<CallCredentials>&
call_creds);
250 const std::shared_ptr<CallCredentials>& creds1,
251 const std::shared_ptr<CallCredentials>& creds2);
266 virtual const char*
GetType()
const {
return ""; }
276 std::multimap<grpc::string, grpc::string>*
metadata) = 0;
279 return "MetadataCredentialsPlugin did not provide a debug string";
284 std::unique_ptr<MetadataCredentialsPlugin> plugin);
290 const grpc::string& json_string,
const std::vector<grpc::string>& scopes);
292 namespace experimental {
323 std::unique_ptr<MetadataCredentialsPlugin> plugin,
349 #endif // GRPCPP_SECURITY_CREDENTIALS_H
grpc::Status StsCredentialsOptionsFromJson(const std::string &json_string, StsCredentialsOptions *options)
std::shared_ptr< CallCredentials > MetadataCredentialsFromPlugin(std::unique_ptr< MetadataCredentialsPlugin > plugin, grpc_security_level min_security_level)
std::shared_ptr< ChannelCredentials > SslCredentials(const SslCredentialsOptions &options)
Builds SSL Credentials given SSL specific options.
grpc::Status StsCredentialsOptionsFromEnv(StsCredentialsOptions *options)
grpc::string pem_cert_chain
std::shared_ptr< ChannelCredentials > CompositeChannelCredentials(const std::shared_ptr< ChannelCredentials > &channel_creds, const std::shared_ptr< CallCredentials > &call_creds)
std::shared_ptr< ChannelCredentials > XdsCredentials(const std::shared_ptr< ChannelCredentials > &fallback_creds)
std::shared_ptr< ChannelCredentials > GoogleDefaultCredentials()
grpc::string token_exchange_service_uri
Classes that require gRPC to be initialized should inherit from this class.
std::shared_ptr< CallCredentials > ExternalAccountCredentials(const grpc::string &json_string, const std::vector< grpc::string > &scopes)
grpc::string subject_token_path
std::shared_ptr< CallCredentials > ServiceAccountJWTAccessCredentials(const grpc::string &json_key, long token_lifetime_seconds=kMaxAuthTokenLifetimeSecs)
virtual grpc::string DebugString()
grpc::string subject_token_type
std::vector< grpc::string > target_service_accounts
Options used to build SslCredentials.
std::shared_ptr< ChannelCredentials > LocalCredentials(grpc_local_connect_type type)
Builds Local Credentials.
grpc::string requested_token_type
struct grpc_call grpc_call
void call_creds(grpc_end2end_test_config config)
virtual std::shared_ptr< Channel > CreateChannelWithInterceptors(const grpc::string &, const ChannelArguments &, std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >>)
grpc::string pem_root_certs
std::shared_ptr< CallCredentials > CompositeCallCredentials(const std::shared_ptr< CallCredentials > &creds1, const std::shared_ptr< CallCredentials > &creds2)
Combines two call credentials objects into a composite call credentials.
grpc::string pem_private_key
grpc::string actor_token_path
std::shared_ptr< CallCredentials > GoogleRefreshTokenCredentials(const grpc::string &json_refresh_token)
std::shared_ptr< ChannelCredentials > TlsCredentials(const TlsChannelCredentialsOptions &options)
Builds TLS Credentials given TLS options.
std::shared_ptr< Channel > CreateCustomChannelWithInterceptors(const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args, std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
std::shared_ptr< Channel > CreateCustomChannel(const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args)
std::shared_ptr< ChannelCredentials > XdsCredentials(const std::shared_ptr< ChannelCredentials > &fallback_creds)
Builds XDS Credentials.
std::shared_ptr< CallCredentials > StsCredentials(const StsCredentialsOptions &options)
virtual bool IsInsecure() const
grpc::string actor_token_type
constexpr long kMaxAuthTokenLifetimeSecs
std::shared_ptr< ChannelCredentials > AltsCredentials(const AltsCredentialsOptions &options)
Builds ALTS Credentials given ALTS specific options.
std::shared_ptr< CallCredentials > AccessTokenCredentials(const grpc::string &access_token)
std::shared_ptr< ChannelCredentials > InsecureChannelCredentials()
Credentials for an unencrypted, unauthenticated channel.
Options used to build AltsCredentials.
absl::string_view method_name
std::shared_ptr< CallCredentials > GoogleComputeEngineCredentials()
std::shared_ptr< CallCredentials > GoogleIAMCredentials(const grpc::string &authorization_token, const grpc::string &authority_selector)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:06