Merge pull request #3406 from jboeuf/auth_plugin_fixes

Credentials plugin fixes (after the branch was merged).
pull/3188/merge
Yang Gao 9 years ago
commit 0eb44a61da
  1. 2
      include/grpc++/security/credentials.h
  2. 2
      src/cpp/client/secure_credentials.cc

@ -177,7 +177,7 @@ class MetadataCredentialsPlugin {
// a different thread from the one processing the call.
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(
grpc::string_ref service_url,
std::multimap<grpc::string, grpc::string_ref>* metadata) = 0;

@ -183,7 +183,7 @@ void MetadataCredentialsPluginWrapper::InvokePlugin(
0,
{{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()),
status.error_message().c_str());
}

Loading…
Cancel
Save