aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp/security/credentials.h
diff options
context:
space:
mode:
authorGravatar kpayson64 <kpayson@google.com>2018-05-11 12:20:11 -0700
committerGravatar kpayson64 <kpayson@google.com>2018-05-11 12:20:11 -0700
commit4fad281ce8affe27fb7428f264d2c3b9dfc45f2f (patch)
treeca96c9efd69afec56aa2e5fe072a9f758247d0a3 /include/grpcpp/security/credentials.h
parentec445cc2bb270ed4acb1c710c3533fca14a50019 (diff)
parent61fdb46ac456027c79841949272ec540f66d2317 (diff)
Merge remote-tracking branch 'upstream/master' into fork_exec_ctx_check
Diffstat (limited to 'include/grpcpp/security/credentials.h')
-rw-r--r--include/grpcpp/security/credentials.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/grpcpp/security/credentials.h b/include/grpcpp/security/credentials.h
index 837a0e43ed..36d95d1b42 100644
--- a/include/grpcpp/security/credentials.h
+++ b/include/grpcpp/security/credentials.h
@@ -21,6 +21,7 @@
#include <map>
#include <memory>
+#include <vector>
#include <grpcpp/impl/codegen/grpc_library.h>
#include <grpcpp/security/auth_context.h>
@@ -219,6 +220,21 @@ class MetadataCredentialsPlugin {
std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
std::unique_ptr<MetadataCredentialsPlugin> plugin);
+namespace experimental {
+
+/// Options used to build AltsCredentials.
+struct AltsCredentialsOptions {
+ /// service accounts of target endpoint that will be acceptable
+ /// by the client. If service accounts are provided and none of them matches
+ /// that of the server, authentication will fail.
+ std::vector<grpc::string> target_service_accounts;
+};
+
+/// Builds ALTS Credentials given ALTS specific options
+std::shared_ptr<ChannelCredentials> AltsCredentials(
+ const AltsCredentialsOptions& options);
+
+} // namespace experimental
} // namespace grpc
#endif // GRPCPP_SECURITY_CREDENTIALS_H