FIRVerifyPhoneNumberRequest.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. NS_ASSUME_NONNULL_BEGIN
  19. @interface FIRVerifyPhoneNumberRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
  20. /** @property verificationID
  21. @brief The verification ID obtained from the response of @c sendVerificationCode.
  22. */
  23. @property(nonatomic, readonly, nullable) NSString *verificationID;
  24. /** @property verificationCode
  25. @brief The verification code provided by the user.
  26. */
  27. @property(nonatomic, readonly, nullable) NSString *verificationCode;
  28. /** @property accessToken
  29. @brief The STS Access Token for the authenticated user.
  30. */
  31. @property(nonatomic, copy, nullable) NSString *accessToken;
  32. /** @var temporaryProof
  33. @brief The a temporary proof code pertaining to this credentil, returned from the backend.
  34. */
  35. @property(nonatomic, readonly, nonnull) NSString *temporaryProof;
  36. /** @var phoneNumber
  37. @brief The a phone number pertaining to this credential, returned from the backend.
  38. */
  39. @property(nonatomic, readonly, nonnull) NSString *phoneNumber;
  40. /** @fn initWithEndpoint:APIKey:
  41. @brief Please use initWithPhoneNumber:APIKey:
  42. */
  43. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  44. APIKey:(NSString *)APIKey NS_UNAVAILABLE;
  45. /** @fn initWithTemporaryProof:phoneNumberAPIKey
  46. @brief Designated initializer.
  47. @param temporaryProof The temporary proof sent by the backed.
  48. @param phoneNumber The phone number associated with the credential to be signed in.
  49. @param APIKey The client's API Key.
  50. */
  51. - (nullable instancetype)initWithTemporaryProof:(NSString *)temporaryProof
  52. phoneNumber:(NSString *)phoneNumber
  53. APIKey:(NSString *)APIKey NS_DESIGNATED_INITIALIZER;
  54. /** @fn initWithVerificationID:verificationCode:APIKey
  55. @brief Designated initializer.
  56. @param verificationID The verification ID obtained from the response of @c sendVerificationCode.
  57. @param verificationCode The verification code provided by the user.
  58. @param APIKey The client's API Key.
  59. */
  60. - (nullable instancetype)initWithVerificationID:(NSString *)verificationID
  61. verificationCode:(NSString *)verificationCode
  62. APIKey:(NSString *)APIKey NS_DESIGNATED_INITIALIZER;
  63. @end
  64. NS_ASSUME_NONNULL_END