diff options
author | 2018-12-07 10:29:24 -0800 | |
---|---|---|
committer | 2018-12-07 10:29:24 -0800 | |
commit | 92db5fc72488f9d62b81ee311a79832df787f3ef (patch) | |
tree | f9f2188c0e15bcbd2a72f446b3193281f1894ff0 /src/objective-c/GRPCClient/GRPCCallOptions.h | |
parent | f0f6e03212837c67d7e078e6f33074e80aa4bcc0 (diff) |
Rename getTokenWithHandler
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCallOptions.h')
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCallOptions.h | 13 |
1 files changed, 12 insertions, 1 deletions
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<NSObject> + +@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<NSCopying, NSMutableCopying> |