Skip to content
Snippets Groups Projects
Commit 0eb44a61 authored by Yang Gao's avatar Yang Gao
Browse files

Merge pull request #3406 from jboeuf/auth_plugin_fixes

Credentials plugin fixes (after the branch was merged).
parents b35ccf50 14929d4e
No related branches found
No related tags found
No related merge requests found
...@@ -177,7 +177,7 @@ class MetadataCredentialsPlugin { ...@@ -177,7 +177,7 @@ class MetadataCredentialsPlugin {
// a different thread from the one processing the call. // a different thread from the one processing the call.
virtual bool IsBlocking() const { return true; } virtual bool IsBlocking() const { return true; }
// Gets the auth metatada produced by this plugin. */ // Gets the auth metatada produced by this plugin.
virtual Status GetMetadata( virtual Status GetMetadata(
grpc::string_ref service_url, grpc::string_ref service_url,
std::multimap<grpc::string, grpc::string_ref>* metadata) = 0; std::multimap<grpc::string, grpc::string_ref>* metadata) = 0;
......
...@@ -183,7 +183,7 @@ void MetadataCredentialsPluginWrapper::InvokePlugin( ...@@ -183,7 +183,7 @@ void MetadataCredentialsPluginWrapper::InvokePlugin(
0, 0,
{{nullptr, nullptr, nullptr, nullptr}}}); {{nullptr, nullptr, nullptr, nullptr}}});
} }
cb(user_data, &md[0], md.size(), cb(user_data, md.empty() ? nullptr : &md[0], md.size(),
static_cast<grpc_status_code>(status.error_code()), static_cast<grpc_status_code>(status.error_code()),
status.error_message().c_str()); status.error_message().c_str());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment