aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/security/credentials.h
diff options
context:
space:
mode:
authorGravatar Julien Boeuf <jboeuf@google.com>2015-11-19 21:45:52 -0800
committerGravatar Julien Boeuf <jboeuf@google.com>2015-11-19 22:24:05 -0800
commit114f39475fa6f28beb51f1a4265e377aa122fbdb (patch)
tree656d3748d121a981aa32aa7820e5fe6124de9cb1 /include/grpc++/security/credentials.h
parentcaf9935e456436a54931bf8112c25515100ccd20 (diff)
Cpp example of how the plugins can be done.
Diffstat (limited to 'include/grpc++/security/credentials.h')
-rw-r--r--include/grpc++/security/credentials.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h
index 56827c0f21..acfc3843b3 100644
--- a/include/grpc++/security/credentials.h
+++ b/include/grpc++/security/credentials.h
@@ -38,6 +38,7 @@
#include <memory>
#include <grpc++/impl/grpc_library.h>
+#include <grpc++/security/auth_context.h>
#include <grpc++/support/config.h>
#include <grpc++/support/status.h>
#include <grpc++/support/string_ref.h>
@@ -207,9 +208,14 @@ class MetadataCredentialsPlugin {
// a different thread from the one processing the call.
virtual bool IsBlocking() const { return true; }
+ // Type of credentials this plugin is implementing.
+ virtual const char* GetType() const { return ""; }
+
// Gets the auth metatada produced by this plugin.
virtual Status GetMetadata(
grpc::string_ref service_url,
+ grpc::string_ref method_name,
+ const AuthContext& channel_auth_contexst,
std::multimap<grpc::string, grpc::string>* metadata) = 0;
};