From 92db5fc72488f9d62b81ee311a79832df787f3ef Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 7 Dec 2018 10:29:24 -0800 Subject: Rename getTokenWithHandler --- src/objective-c/GRPCClient/GRPCCallOptions.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/objective-c/GRPCClient/GRPCCallOptions.h') diff --git a/src/objective-c/GRPCClient/GRPCCallOptions.h b/src/objective-c/GRPCClient/GRPCCallOptions.h index 85786c7417..b7f08480dc 100644 --- a/src/objective-c/GRPCClient/GRPCCallOptions.h +++ b/src/objective-c/GRPCClient/GRPCCallOptions.h @@ -58,13 +58,24 @@ typedef NS_ENUM(NSUInteger, GRPCTransportType) { /** * Implement this protocol to provide a token to gRPC when a call is initiated. */ -@protocol GRPCAuthorizationProtocol +@protocol GRPCAuthorizationProtocol + +@optional + +/** + * 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)provideTokenToHandler:(void (^_Nullable)(NSString *_Nullable token))handler; /** + * This method is deprecated. Please use \a provideTokenToHandler. + * * 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 (^_Nullable)(NSString *_Nullable token))handler; + @end @interface GRPCCallOptions : NSObject -- cgit v1.2.3