From ae99d3a5ed45e135f8b9bd9235b252fed56aa417 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Sat, 20 Oct 2018 12:41:05 -0700 Subject: [PATCH] Document GRPCAuthorizationProtocol --- src/objective-c/GRPCClient/GRPCCallOptions.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/objective-c/GRPCClient/GRPCCallOptions.h b/src/objective-c/GRPCClient/GRPCCallOptions.h index 484f15fde6e..4a93db84bc2 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