@@ -145,7 +145,7 @@ - (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString:(NSString *)URLS
145145 password : (NSString *)password
146146 scope : (NSString *)scope
147147 success : (void (^)(AFOAuthCredential *credential))success
148- failure : (void (^)(NSError *error))failure
148+ failure : (void (^)(AFHTTPRequestOperation, NSError *error))failure
149149{
150150 NSParameterAssert (username);
151151 NSParameterAssert (password);
@@ -164,7 +164,7 @@ - (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString:(NSString *)URLS
164164- (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString : (NSString *)URLString
165165 scope : (NSString *)scope
166166 success : (void (^)(AFOAuthCredential *credential))success
167- failure : (void (^)(NSError *error))failure
167+ failure : (void (^)(AFHTTPRequestOperation, NSError *error))failure
168168{
169169 NSParameterAssert (scope);
170170
@@ -179,7 +179,7 @@ - (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString:(NSString *)URLS
179179- (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString : (NSString *)URLString
180180 refreshToken : (NSString *)refreshToken
181181 success : (void (^)(AFOAuthCredential *credential))success
182- failure : (void (^)(NSError *error))failure
182+ failure : (void (^)(AFHTTPRequestOperation, NSError *error))failure
183183{
184184 NSParameterAssert (refreshToken);
185185
@@ -195,7 +195,7 @@ - (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString:(NSString *)URLS
195195 code : (NSString *)code
196196 redirectURI : (NSString *)uri
197197 success : (void (^)(AFOAuthCredential *credential))success
198- failure : (void (^)(NSError *error))failure
198+ failure : (void (^)(AFHTTPRequestOperation, NSError *error))failure
199199{
200200 NSParameterAssert (code);
201201 NSParameterAssert (uri);
@@ -212,7 +212,7 @@ - (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString:(NSString *)URLS
212212- (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString : (NSString *)URLString
213213 parameters : (NSDictionary *)parameters
214214 success : (void (^)(AFOAuthCredential *credential))success
215- failure : (void (^)(NSError *error))failure
215+ failure : (void (^)(AFHTTPRequestOperation, NSError *error))failure
216216{
217217 NSMutableDictionary *mutableParameters = [NSMutableDictionary dictionaryWithDictionary: parameters];
218218 if (!self.useHTTPBasicAuthentication ) {
@@ -221,18 +221,18 @@ - (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString:(NSString *)URLS
221221 }
222222 parameters = [NSDictionary dictionaryWithDictionary: mutableParameters];
223223
224- AFHTTPRequestOperation *requestOperation = [self POST: URLString parameters: parameters success: ^(__unused AFHTTPRequestOperation *operation, id responseObject) {
224+ AFHTTPRequestOperation *requestOperation = [self POST: URLString parameters: parameters success: ^(AFHTTPRequestOperation *operation, id responseObject) {
225225 if (!responseObject) {
226226 if (failure) {
227- failure (nil );
227+ failure (operation, nil );
228228 }
229229
230230 return ;
231231 }
232232
233233 if ([responseObject valueForKey: @" error" ]) {
234234 if (failure) {
235- failure (AFErrorFromRFC6749Section5_2Error (responseObject));
235+ failure (operation, AFErrorFromRFC6749Section5_2Error (responseObject));
236236 }
237237
238238 return ;
@@ -264,9 +264,9 @@ - (AFHTTPRequestOperation *)authenticateUsingOAuthWithURLString:(NSString *)URLS
264264 if (success) {
265265 success (credential);
266266 }
267- } failure: ^(__unused AFHTTPRequestOperation *operation, NSError *error) {
267+ } failure: ^(AFHTTPRequestOperation *operation, NSError *error) {
268268 if (failure) {
269- failure (error);
269+ failure (operation, error);
270270 }
271271 }];
272272
0 commit comments