You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.6 KiB

6 years ago
  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 "FIRIdentityToolkitRequest.h"
  17. #import "FIRAuthRPCRequest.h"
  18. #import "FIRIdentityToolkitRequest.h"
  19. @class FIRAuthAppCredential;
  20. NS_ASSUME_NONNULL_BEGIN
  21. @interface FIRSendVerificationCodeRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
  22. /** @property phoneNumber
  23. @brief The phone number to which the verification code should be sent.
  24. */
  25. @property(nonatomic, strong, readonly) NSString *phoneNumber;
  26. /** @property appCredential
  27. @brief The credential to prove the identity of the app in order to send the verification code.
  28. */
  29. @property(nonatomic, strong, readonly, nullable) FIRAuthAppCredential *appCredential;
  30. /** @property reCAPTCHAToken
  31. @brief The reCAPTCHA token to prove the identity of the app in order to send the verification
  32. code.
  33. */
  34. @property(nonatomic, strong, readonly, nullable) NSString *reCAPTCHAToken;
  35. /** @fn initWithEndpoint:requestConfiguration:
  36. @brief Please use initWithPhoneNumber:appCredentials:requestConfiguration: instead.
  37. */
  38. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  39. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  40. NS_UNAVAILABLE;
  41. /** @fn initWithPhoneNumber:appCredentials:requestConfiguration:
  42. @brief Designated initializer.
  43. @param phoneNumber The phone number to which the verification code is to be sent.
  44. @param appCredential The credential that proves the identity of the app.
  45. @param reCAPTCHAToken The reCAPTCHA token that proves the identity of the app.
  46. @param requestConfiguration An object containing configurations to be added to the request.
  47. */
  48. - (nullable instancetype)initWithPhoneNumber:(NSString *)phoneNumber
  49. appCredential:(nullable FIRAuthAppCredential *)appCredential
  50. reCAPTCHAToken:(nullable NSString *)reCAPTCHAToken
  51. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  52. NS_DESIGNATED_INITIALIZER;
  53. @end
  54. NS_ASSUME_NONNULL_END