diff options
Diffstat (limited to 'include/grpc++/security')
-rw-r--r-- | include/grpc++/security/credentials.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index cc827f09b0..e5652dc184 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> @@ -206,9 +207,17 @@ 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. + // The fully qualified method name is: + // service_url + "/" + method_name. + // The channel_auth_context contains (among other things), the identity of + // the server. virtual Status GetMetadata( - grpc::string_ref service_url, + grpc::string_ref service_url, grpc::string_ref method_name, + const AuthContext& channel_auth_context, std::multimap<grpc::string, grpc::string>* metadata) = 0; }; |