diff options
author | Julien Boeuf <jboeuf@google.com> | 2015-08-26 23:17:35 -0700 |
---|---|---|
committer | Julien Boeuf <jboeuf@google.com> | 2015-08-26 23:17:35 -0700 |
commit | 35b559f6f7e4e6410613632bbfe3f2ab84073feb (patch) | |
tree | 0b50ad0d2192340644702b0a39d913d3a0b0d64e /include/grpc++/auth_metadata_processor.h | |
parent | 5b3516e2c5c3c6878d28cd19db73d5572851e6b9 (diff) |
Aligning C++ interface with C for the auth metadata processor.
Diffstat (limited to 'include/grpc++/auth_metadata_processor.h')
-rw-r--r-- | include/grpc++/auth_metadata_processor.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/grpc++/auth_metadata_processor.h b/include/grpc++/auth_metadata_processor.h index 3caf3e84fd..c0631bc11f 100644 --- a/include/grpc++/auth_metadata_processor.h +++ b/include/grpc++/auth_metadata_processor.h @@ -35,14 +35,18 @@ #define GRPCXX_AUTH_METADATA_PROCESSOR_H_ #include <map> -#include <string> #include <grpc++/support/auth_context.h> +#include <grpc++/support/status.h> +#include <grpc++/support/string_ref.h> namespace grpc { class AuthMetadataProcessor { public: + typedef std::multimap<grpc::string_ref, grpc::string_ref> InputMetadata; + typedef std::multimap<grpc::string, grpc::string_ref> OutputMetadata; + virtual ~AuthMetadataProcessor() {} // If this method returns true, the Process function will be scheduled in @@ -54,11 +58,11 @@ class AuthMetadataProcessor { // from the passed-in auth_metadata. // consumed_auth_metadata needs to be filled with metadata that has been // consumed by the processor and will be removed from the call. - // Returns true if successful. - virtual bool Process( - const std::multimap<grpc::string, grpc::string>& auth_metadata, - AuthContext* context, - std::multimap<grpc::string, grpc::string>* consumed_auth_metadata) = 0; + // TODO(jboeuf). + virtual Status Process(const InputMetadata& auth_metadata, + AuthContext* context, + OutputMetadata* consumed_auth_metadata, + OutputMetadata* response_metadata) = 0; }; } // namespace grpc |