aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-07-28 23:21:03 -0700
committerGravatar yang-g <yangg@google.com>2015-07-28 23:21:03 -0700
commit487f5a20b690058cc57f83cce94c2df60499fb8b (patch)
treea748ce32aa98b72a9dc024d166288952caccaf08 /include
parentf1ec3770637750e3cd732638aa9a2ddca72f3754 (diff)
add warning comments
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/client_context.h4
-rw-r--r--include/grpc++/server_context.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h
index f18fb61b4c..bb39042bcb 100644
--- a/include/grpc++/client_context.h
+++ b/include/grpc++/client_context.h
@@ -118,6 +118,10 @@ class ClientContext {
std::shared_ptr<const AuthContext> auth_context() const;
+ // Return the peer uri in a string.
+ // WARNING: this value is never authenticated or subject to any security
+ // related code. It must not be used for any authentication related
+ // functionality. Instead, use auth_context.
grpc::string peer() const;
// Get and set census context
diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h
index 393822c4fd..1e848935a2 100644
--- a/include/grpc++/server_context.h
+++ b/include/grpc++/server_context.h
@@ -116,6 +116,10 @@ class ServerContext {
std::shared_ptr<const AuthContext> auth_context() const;
+ // Return the peer uri in a string.
+ // WARNING: this value is never authenticated or subject to any security
+ // related code. It must not be used for any authentication related
+ // functionality. Instead, use auth_context.
grpc::string peer() const;
private: