FIRSignUpNewUserRequest.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 <Foundation/Foundation.h>
  17. #import "FirebaseAuth/Sources/Backend/FIRAuthRPCRequest.h"
  18. #import "FirebaseAuth/Sources/Backend/FIRIdentityToolkitRequest.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. @interface FIRSignUpNewUserRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
  21. /** @property email
  22. @brief The email of the user.
  23. */
  24. @property(nonatomic, copy, nullable) NSString *email;
  25. /** @property password
  26. @brief The password inputed by the user.
  27. */
  28. @property(nonatomic, copy, nullable) NSString *password;
  29. /** @property displayName
  30. @brief The password inputed by the user.
  31. */
  32. @property(nonatomic, copy, nullable) NSString *displayName;
  33. /** @property captchaResponse
  34. @brief Response to the captcha.
  35. */
  36. @property(nonatomic, copy, nullable) NSString *captchaResponse;
  37. /** @property clientType
  38. @brief The reCAPTCHA client type.
  39. */
  40. @property(nonatomic, copy, nullable) NSString *clientType;
  41. /** @property captchaResponse
  42. @brief The reCAPTCHA version.
  43. */
  44. @property(nonatomic, copy, nullable) NSString *recaptchaVersion;
  45. /** @property returnSecureToken
  46. @brief Whether the response should return access token and refresh token directly.
  47. @remarks The default value is @c YES .
  48. */
  49. @property(nonatomic, assign) BOOL returnSecureToken;
  50. /** @fn initWithEndpoint:requestConfiguration:
  51. @brief Please use initWithAPIKey:email:password:displayName:requestConfiguration instead.
  52. */
  53. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  54. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  55. NS_UNAVAILABLE;
  56. /** @fn initWithEndpoint:requestConfiguration:
  57. @brief initializer for anonymous sign-in.
  58. */
  59. - (nullable instancetype)initWithRequestConfiguration:
  60. (FIRAuthRequestConfiguration *)requestConfiguration;
  61. /** @fn initWithAPIKey:email:password:displayName:requestConfiguration
  62. @brief Designated initializer.
  63. @param requestConfiguration An object containing configurations to be added to the request.
  64. */
  65. - (nullable instancetype)initWithEmail:(nullable NSString *)email
  66. password:(nullable NSString *)password
  67. displayName:(nullable NSString *)displayName
  68. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  69. NS_DESIGNATED_INITIALIZER;
  70. @end
  71. NS_ASSUME_NONNULL_END