5656@class FIRSignUpNewUserResponse;
5757@class FIRRevokeTokenRequest;
5858@class FIRRevokeTokenResponse;
59+ @class FIRGetRecaptchaConfigRequest;
60+ @class FIRGetRecaptchaConfigResponse;
5961
6062@protocol FIRAuthBackendImplementation;
6163@protocol FIRAuthBackendRPCIssuer;
@@ -241,6 +243,15 @@ typedef void (^FIRRevokeTokenResponseCallback)(FIRRevokeTokenResponse *_Nullable
241243typedef void (^FIRSignInWithGameCenterResponseCallback)(
242244 FIRSignInWithGameCenterResponse *_Nullable response, NSError *_Nullable error);
243245
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+
244255/* * @class FIRAuthBackend
245256 @brief Simple static class with methods representing the backend RPCs.
246257 @remarks All callback blocks passed as method parameters are invoked asynchronously on the
@@ -398,6 +409,15 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
398409+ (void )signInWithGameCenter : (FIRSignInWithGameCenterRequest *)request
399410 callback : (FIRSignInWithGameCenterResponseCallback)callback ;
400411
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+
401421#if TARGET_OS_IOS
402422/* * @fn sendVerificationCode:callback:
403423 @brief Calls the sendVerificationCode endpoint, which is responsible for sending the
@@ -444,16 +464,16 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
444464 */
445465@protocol FIRAuthBackendRPCIssuer <NSObject >
446466
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.
449469 @param requestConfiguration The request to be made.
450470 @param URL The request URL.
451471 @param body Request body.
452472 @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
454474 work queue in the future.
455475 */
456- - (void )asyncPostToURLWithRequestConfiguration : (FIRAuthRequestConfiguration *)requestConfiguration
476+ - (void )asyncCallToURLWithRequestConfiguration : (FIRAuthRequestConfiguration *)requestConfiguration
457477 URL : (NSURL *)URL
458478 body : (nullable NSData *)body
459479 contentType : (NSString *)contentType
@@ -620,6 +640,15 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
620640- (void )signInWithGameCenter : (FIRSignInWithGameCenterRequest *)request
621641 callback : (FIRSignInWithGameCenterResponseCallback)callback ;
622642
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+
623652/* * @fn resetPassword:callback
624653 @brief Calls the resetPassword endpoint, which is responsible for resetting a user's password
625654 given an OOB code and new password.
@@ -629,8 +658,8 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
629658- (void )resetPassword : (FIRResetPasswordRequest *)request
630659 callback : (FIRResetPasswordCallback)callback ;
631660
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 .
634663 @remarks Possible error responses:
635664 @see FIRAuthInternalErrorCodeRPCRequestEncodingError
636665 @see FIRAuthInternalErrorCodeJSONSerializationError
@@ -642,7 +671,7 @@ typedef void (^FIRSignInWithGameCenterResponseCallback)(
642671 @param response The empty response to be filled.
643672 @param callback The callback for both success and failure.
644673*/
645- - (void )postWithRequest : (id <FIRAuthRPCRequest>)request
674+ - (void )callWithRequest : (id <FIRAuthRPCRequest>)request
646675 response : (id <FIRAuthRPCResponse>)response
647676 callback : (void (^)(NSError *_Nullable error))callback ;
648677
0 commit comments