You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.2 KiB

6 years ago
  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 "FIRAuthRPCRequest.h"
  18. #import "FIRIdentityToolkitRequest.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @class FIREmailLinkSignInRequest
  21. @brief Represents the parameters for the emailLinkSignin endpoint.
  22. */
  23. @interface FIREmailLinkSignInRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
  24. #pragma mark - Components of "postBody"
  25. /** @property email
  26. @brief The email identifier used to complete the email link sign-in.
  27. */
  28. @property(nonatomic, copy, readonly) NSString *email;
  29. /** @property oobCode
  30. @brief The OOB code used to complete the email link sign-in flow.
  31. */
  32. @property(nonatomic, copy, readonly) NSString *oobCode;
  33. /** @property idToken
  34. @brief The ID Token code potentially used to complete the email link sign-in flow.
  35. */
  36. @property(nonatomic, copy) NSString *IDToken;
  37. /** @fn initWithEndpoint:requestConfiguration:
  38. @brief Please use initWithProviderID:requestConfifuration instead.
  39. */
  40. - (instancetype)initWithEndpoint:(NSString *)endpoint
  41. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration NS_UNAVAILABLE;
  42. /** @fn initWithProviderID:requestConfifuration
  43. @brief Designated initializer.
  44. @param email The email identifier used to complete hte email link sign-in flow.
  45. @param oobCode The OOB code used to complete the email link sign-in flow.
  46. @param requestConfiguration An object containing configurations to be added to the request.
  47. */
  48. - (instancetype)initWithEmail:(NSString *)email
  49. oobCode:(NSString *)oobCode
  50. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  51. NS_DESIGNATED_INITIALIZER;
  52. @end
  53. NS_ASSUME_NONNULL_END