FIRVerifyPasswordRequest.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. /** @class FIRVerifyPasswordRequest
  21. @brief Represents the parameters for the verifyPassword endpoint.
  22. @see https://developers.google.com/identity/toolkit/web/reference/relyingparty/verifyPassword
  23. */
  24. @interface FIRVerifyPasswordRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
  25. /** @property email
  26. @brief The email of the user.
  27. */
  28. @property(nonatomic, copy) NSString *email;
  29. /** @property password
  30. @brief The password inputed by the user.
  31. */
  32. @property(nonatomic, copy) NSString *password;
  33. /** @property pendingIDToken
  34. @brief The GITKit token for the non-trusted IDP, which is to be confirmed by the user.
  35. */
  36. @property(nonatomic, copy, nullable) NSString *pendingIDToken;
  37. /** @property captchaChallenge
  38. @brief The captcha challenge.
  39. */
  40. @property(nonatomic, copy, nullable) NSString *captchaChallenge;
  41. /** @property captchaResponse
  42. @brief Response to the captcha.
  43. */
  44. @property(nonatomic, copy, nullable) NSString *captchaResponse;
  45. /** @property clientType
  46. @brief The reCAPTCHA client type.
  47. */
  48. @property(nonatomic, copy, nullable) NSString *clientType;
  49. /** @property captchaResponse
  50. @brief The reCAPTCHA version.
  51. */
  52. @property(nonatomic, copy, nullable) NSString *recaptchaVersion;
  53. /** @property returnSecureToken
  54. @brief Whether the response should return access token and refresh token directly.
  55. @remarks The default value is @c YES .
  56. */
  57. @property(nonatomic, assign) BOOL returnSecureToken;
  58. /** @fn initWithEndpoint:requestConfiguration:
  59. @brief Please use initWithEmail:password:requestConfiguration:
  60. */
  61. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  62. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  63. NS_UNAVAILABLE;
  64. /** @fn initWithEmail:password:requestConfiguration:
  65. @brief Designated initializer.
  66. @param email The email of the user.
  67. @param password The password inputed by the user.
  68. @param requestConfiguration The configu
  69. */
  70. - (nullable instancetype)initWithEmail:(NSString *)email
  71. password:(NSString *)password
  72. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  73. NS_DESIGNATED_INITIALIZER;
  74. @end
  75. NS_ASSUME_NONNULL_END