diff options
author | David Garcia Quintas <dgq@google.com> | 2015-07-15 14:07:18 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-07-15 14:07:18 -0700 |
commit | e0d581b6ad1023635598d9de95bd951cd04b0354 (patch) | |
tree | a0601b1315a1dc7b499998a95adba61322825f3c /src/cpp/client | |
parent | 658b6087cc07f8706d270ee0e31f28bbf732ec3d (diff) | |
parent | 3e5d61670e23b040ed47b2df1e4c87ee2cfec4aa (diff) |
Merge branch 'master' of github.com:grpc/grpc into decompression
# Conflicts:
# Makefile
# include/grpc++/client_context.h
# include/grpc++/server_context.h
# src/cpp/client/client_context.cc
# src/cpp/server/server_context.cc
# vsprojects/Grpc.mak
Diffstat (limited to 'src/cpp/client')
-rw-r--r-- | src/cpp/client/client_context.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index 0eba554e33..cc5f51d618 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -39,6 +39,7 @@ #include <grpc++/time.h> #include "src/core/channel/compress_filter.h" +#include "src/cpp/common/create_auth_context.h" namespace grpc { @@ -96,6 +97,13 @@ void ClientContext::set_compression_algorithm( AddMetadata(GRPC_COMPRESS_REQUEST_ALGORITHM_KEY, algorithm_name); } +std::shared_ptr<const AuthContext> ClientContext::auth_context() const { + if (auth_context_.get() == nullptr) { + auth_context_ = CreateAuthContext(call_); + } + return auth_context_; +} + void ClientContext::TryCancel() { if (call_) { grpc_call_cancel(call_); |