56
56
@class FIRSignUpNewUserResponse;
57
57
@class FIRRevokeTokenRequest;
58
58
@class FIRRevokeTokenResponse;
59
+ @class FIRGetRecaptchaConfigRequest;
60
+ @class FIRGetRecaptchaConfigResponse;
59
61
60
62
@protocol FIRAuthBackendImplementation;
61
63
@protocol FIRAuthBackendRPCIssuer;
@@ -241,6 +243,15 @@ typedef void (^FIRRevokeTokenResponseCallback)(FIRRevokeTokenResponse *_Nullable
241
243
typedef void (^FIRSignInWithGameCenterResponseCallback)(
242
244
FIRSignInWithGameCenterResponse *_Nullable response, NSError *_Nullable error);
243
245
246
+ /* * @typedef FIRGetRecaptchaConfigResponseCallback
247
+ @brief The type of block used to return the result of a call to the getRecaptchaConfig endpoint.
248
+ @param response The received response, if any.
249
+ @param error The error which occurred, if any.
250
+ @remarks One of response or error will be non-nil.
251
+ */
252
+ typedef void (^FIRGetRecaptchaConfigResponseCallback)(
253
+ FIRGetRecaptchaConfigResponse *_Nullable response, NSError *_Nullable error);
254
+
244
255
/* * @class FIRAuthBackend
245
256
@brief Simple static class with methods representing the backend RPCs.
246
257
@remarks All callback blocks passed as method parameters are invoked asynchronously on the
@@ -398,6 +409,15 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
398
409
+ (void )signInWithGameCenter : (FIRSignInWithGameCenterRequest *)request
399
410
callback : (FIRSignInWithGameCenterResponseCallback)callback ;
400
411
412
+ /* * @fn getRecaptchaConfig:callback:
413
+ @brief Calls the getRecaptchaConfig endpoint, which is responsible for retrieving the recaptcha
414
+ configs including site key, provider enablement status.
415
+ @param request The request parameters.
416
+ @param callback The callback.
417
+ */
418
+ + (void )getRecaptchaConfig : (FIRGetRecaptchaConfigRequest *)request
419
+ callback : (FIRGetRecaptchaConfigResponseCallback)callback ;
420
+
401
421
#if TARGET_OS_IOS
402
422
/* * @fn sendVerificationCode:callback:
403
423
@brief Calls the sendVerificationCode endpoint, which is responsible for sending the
@@ -444,16 +464,16 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
444
464
*/
445
465
@protocol FIRAuthBackendRPCIssuer <NSObject >
446
466
447
- /* * @fn asyncPostToURLWithRequestConfiguration :URL:body:contentType:completionHandler:
448
- @brief Asynchronously seXnds a POST request.
467
+ /* * @fn asyncCallToURLWithRequestConfiguration :URL:body:contentType:completionHandler:
468
+ @brief Asynchronously sends a HTTP request.
449
469
@param requestConfiguration The request to be made.
450
470
@param URL The request URL.
451
471
@param body Request body.
452
472
@param contentType Content type of the body.
453
- @param handler provided that handles POST response. Invoked asynchronously on the auth global
473
+ @param handler provided that handles HTTP response. Invoked asynchronously on the auth global
454
474
work queue in the future.
455
475
*/
456
- - (void )asyncPostToURLWithRequestConfiguration : (FIRAuthRequestConfiguration *)requestConfiguration
476
+ - (void )asyncCallToURLWithRequestConfiguration : (FIRAuthRequestConfiguration *)requestConfiguration
457
477
URL : (NSURL *)URL
458
478
body : (nullable NSData *)body
459
479
contentType : (NSString *)contentType
@@ -620,6 +640,15 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
620
640
- (void )signInWithGameCenter : (FIRSignInWithGameCenterRequest *)request
621
641
callback : (FIRSignInWithGameCenterResponseCallback)callback ;
622
642
643
+ /* * @fn getRecaptchaConfig:callback:
644
+ @brief Calls the getRecaptchaConfig endpoint, which is responsible for retrieving the recaptcha
645
+ configs including site key, provider enablement status.
646
+ @param request The request parameters.
647
+ @param callback The callback.
648
+ */
649
+ - (void )getRecaptchaConfig : (FIRGetRecaptchaConfigRequest *)request
650
+ callback : (FIRGetRecaptchaConfigResponseCallback)callback ;
651
+
623
652
/* * @fn resetPassword:callback
624
653
@brief Calls the resetPassword endpoint, which is responsible for resetting a user's password
625
654
given an OOB code and new password.
@@ -629,8 +658,8 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
629
658
- (void )resetPassword : (FIRResetPasswordRequest *)request
630
659
callback : (FIRResetPasswordCallback)callback ;
631
660
632
- /* * @fn postWithRequest :response:callback:
633
- @brief Calls the RPC using HTTP POST .
661
+ /* * @fn callWithRequest :response:callback:
662
+ @brief Calls the RPC using HTTP request .
634
663
@remarks Possible error responses:
635
664
@see FIRAuthInternalErrorCodeRPCRequestEncodingError
636
665
@see FIRAuthInternalErrorCodeJSONSerializationError
@@ -642,7 +671,7 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
642
671
@param response The empty response to be filled.
643
672
@param callback The callback for both success and failure.
644
673
*/
645
- - (void )postWithRequest : (id <FIRAuthRPCRequest>)request
674
+ - (void )callWithRequest : (id <FIRAuthRPCRequest>)request
646
675
response : (id <FIRAuthRPCResponse>)response
647
676
callback : (void (^)(NSError *_Nullable error))callback ;
648
677
0 commit comments