FIRSendVerificationCodeRequest.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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) FIRAuthAppCredential *appCredential;
  30. /** @fn initWithEndpoint:APIKey:
  31. @brief Please use initWithPhoneNumber:APIKey:
  32. */
  33. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  34. APIKey:(NSString *)APIKey NS_UNAVAILABLE;
  35. /** @fn initWithPhoneNumber:APIKey:
  36. @brief Designated initializer.
  37. @param phoneNumber The phone number to which the verification code is to be sent.
  38. @param appCredential The credential that proves the identity of the app.
  39. @param APIKey The client's API Key.
  40. */
  41. - (nullable instancetype)initWithPhoneNumber:(NSString *)phoneNumber
  42. appCredential:(FIRAuthAppCredential *)appCredential
  43. APIKey:(NSString *)APIKey NS_DESIGNATED_INITIALIZER;
  44. @end
  45. NS_ASSUME_NONNULL_END