From 6b93d46bb841200f100cb0dd7f8c6b62af445078 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Tue, 23 Aug 2016 10:04:03 -0700 Subject: Adding extension points for security context. --- include/grpc++/impl/codegen/client_context.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/grpc++/impl/codegen/client_context.h') diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index 012bcc2bbe..156bdb82f7 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -307,6 +307,12 @@ class ClientContext { }; static void SetGlobalCallbacks(GlobalCallbacks* callbacks); + // Should be used for framework-level extensions only. + // Applications never need to call this method. + grpc_call* c_call() const { + return call_; + } + private: // Disallow copy and assign. ClientContext(const ClientContext&); -- cgit v1.2.3 From bb04734eecc84eb7a2acde8e8ba77e5ae2cbe4fd Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Mon, 4 Jul 2016 13:12:59 +0900 Subject: Fix a typo --- include/grpc++/impl/codegen/client_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/grpc++/impl/codegen/client_context.h') diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index 012bcc2bbe..fb10a3be1a 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -271,7 +271,7 @@ class ClientContext { /// Set \a algorithm to be the compression algorithm used for the client call. /// - /// \param algorith The compression algorithm used for the client call. + /// \param algorithm The compression algorithm used for the client call. void set_compression_algorithm(grpc_compression_algorithm algorithm); /// Return the peer uri in a string. -- cgit v1.2.3 From 2b2b345841be2f2d1fd220264c034bdf440eb0ca Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Thu, 25 Aug 2016 21:22:55 -0700 Subject: Addressing feedback. --- include/grpc++/impl/codegen/client_context.h | 4 +--- include/grpc++/impl/codegen/server_context.h | 4 +--- src/core/lib/security/context/security_context.h | 5 +++++ 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'include/grpc++/impl/codegen/client_context.h') diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index 156bdb82f7..72ed639b03 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -309,9 +309,7 @@ class ClientContext { // Should be used for framework-level extensions only. // Applications never need to call this method. - grpc_call* c_call() const { - return call_; - } + grpc_call* c_call() { return call_; } private: // Disallow copy and assign. diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h index 82cb5a32ea..c9d1f4d69e 100644 --- a/include/grpc++/impl/codegen/server_context.h +++ b/include/grpc++/impl/codegen/server_context.h @@ -168,9 +168,7 @@ class ServerContext { // Should be used for framework-level extensions only. // Applications never need to call this method. - grpc_call* c_call() const { - return call_; - } + grpc_call* c_call() { return call_; } private: friend class ::grpc::testing::InteropServerContextInspector; diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h index b2ffd4efc2..1e131a0c23 100644 --- a/src/core/lib/security/context/security_context.h +++ b/src/core/lib/security/context/security_context.h @@ -84,6 +84,11 @@ void grpc_auth_context_unref(grpc_auth_context *policy); void grpc_auth_property_reset(grpc_auth_property *property); +/* --- grpc_security_context_extension --- + + Extension to the security context that may be set in a filter and accessed + later by a higher level method on a grpc_call object. */ + typedef struct { void *instance; void (*destroy)(void *); -- cgit v1.2.3