FIRSignUpNewUserRequest.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 captchaResponse
  38. @brief The reCAPTCHA version.
  39. */
  40. @property(nonatomic, copy, nullable) NSString *recaptchaVersion;
  41. /** @property returnSecureToken
  42. @brief Whether the response should return access token and refresh token directly.
  43. @remarks The default value is @c YES .
  44. */
  45. @property(nonatomic, assign) BOOL returnSecureToken;
  46. /** @fn initWithEndpoint:requestConfiguration:
  47. @brief Please use initWithAPIKey:email:password:displayName:requestConfiguration instead.
  48. */
  49. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  50. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  51. NS_UNAVAILABLE;
  52. /** @fn initWithEndpoint:requestConfiguration:
  53. @brief initializer for anonymous sign-in.
  54. */
  55. - (nullable instancetype)initWithRequestConfiguration:
  56. (FIRAuthRequestConfiguration *)requestConfiguration;
  57. /** @fn initWithAPIKey:email:password:displayName:requestConfiguration
  58. @brief Designated initializer.
  59. @param requestConfiguration An object containing configurations to be added to the request.
  60. */
  61. - (nullable instancetype)initWithEmail:(nullable NSString *)email
  62. password:(nullable NSString *)password
  63. displayName:(nullable NSString *)displayName
  64. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  65. NS_DESIGNATED_INITIALIZER;
  66. @end
  67. NS_ASSUME_NONNULL_END