19 #ifndef GRPC_INTERNAL_CPP_CLIENT_SECURE_CREDENTIALS_H 20 #define GRPC_INTERNAL_CPP_CLIENT_SECURE_CREDENTIALS_H 22 #include <grpc/grpc_security.h> 29 #include "src/core/lib/security/credentials/credentials.h" 40 if (c_creds_ !=
nullptr) c_creds_->Unref();
50 std::shared_ptr<Channel> CreateChannelWithInterceptors(
52 std::vector<std::unique_ptr<
54 interceptor_creators)
override;
55 grpc_channel_credentials*
const c_creds_;
62 if (c_creds_ !=
nullptr) c_creds_->Unref();
70 grpc_call_credentials*
const c_creds_;
73 namespace experimental {
89 static void Destroy(
void* wrapper);
91 void* wrapper, grpc_auth_metadata_context context,
92 grpc_credentials_plugin_metadata_cb cb,
void* user_data,
93 grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
95 const char** error_details);
98 std::unique_ptr<MetadataCredentialsPlugin> plugin);
102 grpc_auth_metadata_context context,
103 grpc_credentials_plugin_metadata_cb cb,
void* user_data,
104 grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
106 const char** error_details);
107 std::unique_ptr<ThreadPoolInterface> thread_pool_;
108 std::unique_ptr<MetadataCredentialsPlugin> plugin_;
113 #endif // GRPC_INTERNAL_CPP_CLIENT_SECURE_CREDENTIALS_H SecureChannelCredentials * AsSecureCredentials() override
Definition: secure_credentials.h:47
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:70
grpc_status_code
Definition: status.h:26
Definition: secure_credentials.h:58
std::string string
Definition: config.h:35
A call credentials object encapsulates the state needed by a client to authenticate with a server for...
Definition: credentials_impl.h:111
SecureCallCredentials * AsSecureCredentials() override
Definition: secure_credentials.h:67
grpc_channel_credentials * GetRawCreds()
Definition: secure_credentials.h:42
Classes that require gRPC to be initialized should inherit from this class.
Definition: grpc_library.h:38
Definition: client_interceptor.h:49
std::shared_ptr< Channel > CreateChannelImpl(const grpc::string &target, const ChannelArguments &args) override
Definition: secure_credentials.cc:49
Definition: secure_credentials.h:36
::grpc_impl::Channel Channel
Definition: channel.h:26
grpc_call_credentials * GetRawCreds()
Definition: secure_credentials.h:64
SecureCallCredentials(grpc_call_credentials *c_creds)
Definition: secure_credentials.cc:72
grpc_sts_credentials_options StsCredentialsCppToCoreOptions(const StsCredentialsOptions &options)
Definition: secure_credentials.cc:236
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
Options for channel creation.
Definition: channel_arguments_impl.h:43
~SecureChannelCredentials()
Definition: secure_credentials.h:39
A channel credentials object encapsulates all the state needed by a client to authenticate with a ser...
Definition: credentials_impl.h:66
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm_impl.h:33
SecureChannelCredentials(grpc_channel_credentials *c_creds)
Definition: secure_credentials.cc:43
bool ApplyToCall(grpc_call *call) override
Apply this instance's credentials to call.
Definition: secure_credentials.cc:77
~SecureCallCredentials()
Definition: secure_credentials.h:61
::grpc_impl::experimental::StsCredentialsOptions StsCredentialsOptions
Definition: credentials.h:104