FIRSendVerificationCodeRequest.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import "FirebaseAuth/Sources/Backend/FIRAuthRPCRequest.h"
  17. #import "FirebaseAuth/Sources/Backend/FIRIdentityToolkitRequest.h"
  18. @class FIRAuthAppCredential;
  19. NS_ASSUME_NONNULL_BEGIN
  20. @interface FIRSendVerificationCodeRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
  21. /** @property phoneNumber
  22. @brief The phone number to which the verification code should be sent.
  23. */
  24. @property(nonatomic, strong, readonly) NSString *phoneNumber;
  25. /** @property appCredential
  26. @brief The credential to prove the identity of the app in order to send the verification code.
  27. */
  28. @property(nonatomic, strong, readonly, nullable) FIRAuthAppCredential *appCredential;
  29. /** @property reCAPTCHAToken
  30. @brief The reCAPTCHA token to prove the identity of the app in order to send the verification
  31. code.
  32. */
  33. @property(nonatomic, strong, readonly, nullable) NSString *reCAPTCHAToken;
  34. /** @fn initWithEndpoint:requestConfiguration:
  35. @brief Please use initWithPhoneNumber:appCredentials:requestConfiguration: instead.
  36. */
  37. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  38. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  39. NS_UNAVAILABLE;
  40. /** @fn initWithPhoneNumber:appCredentials:requestConfiguration:
  41. @brief Designated initializer.
  42. @param phoneNumber The phone number to which the verification code is to be sent.
  43. @param appCredential The credential that proves the identity of the app.
  44. @param reCAPTCHAToken The reCAPTCHA token that proves the identity of the app.
  45. @param requestConfiguration An object containing configurations to be added to the request.
  46. */
  47. - (nullable instancetype)initWithPhoneNumber:(NSString *)phoneNumber
  48. appCredential:(nullable FIRAuthAppCredential *)appCredential
  49. reCAPTCHAToken:(nullable NSString *)reCAPTCHAToken
  50. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  51. NS_DESIGNATED_INITIALIZER;
  52. @end
  53. NS_ASSUME_NONNULL_END