aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/GRPCCallOptions.h
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-10-20 12:41:05 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-10-20 12:41:05 -0700
commitae99d3a5ed45e135f8b9bd9235b252fed56aa417 (patch)
tree6188ae26806ad4b55356e3a6474441bc16eb0e88 /src/objective-c/GRPCClient/GRPCCallOptions.h
parente667a3fb8f3465732926d44bc882dfaabc8dae54 (diff)
Document GRPCAuthorizationProtocol
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCallOptions.h')
-rw-r--r--src/objective-c/GRPCClient/GRPCCallOptions.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCallOptions.h b/src/objective-c/GRPCClient/GRPCCallOptions.h
index 484f15fde6..4a93db84bc 100644
--- a/src/objective-c/GRPCClient/GRPCCallOptions.h
+++ b/src/objective-c/GRPCClient/GRPCCallOptions.h
@@ -57,7 +57,15 @@ typedef NS_ENUM(NSInteger, GRPCTransportType) {
GRPCTransportTypeInsecure,
};
+/**
+ * Implement this protocol to provide a token to gRPC when a call is initiated.
+ */
@protocol GRPCAuthorizationProtocol
+
+/**
+ * This method is called when gRPC is about to start the call. When OAuth token is acquired,
+ * \a handler is expected to be called with \a token being the new token to be used for this call.
+ */
- (void)getTokenWithHandler:(void (^)(NSString *token))hander;
@end