Brak opisu

FIREmailAuthProvider.h 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. @class FIRAuthCredential;
  18. NS_ASSUME_NONNULL_BEGIN
  19. /**
  20. @brief A string constant identifying the email & password identity provider.
  21. */
  22. extern NSString *const FIREmailAuthProviderID NS_SWIFT_NAME(EmailAuthProviderID);
  23. /**
  24. @brief A string constant identifying the email-link sign-in method.
  25. */
  26. extern NSString *const FIREmailLinkAuthSignInMethod NS_SWIFT_NAME(EmailLinkAuthSignInMethod);
  27. /**
  28. @brief A string constant identifying the email & password sign-in method.
  29. */
  30. extern NSString *const FIREmailPasswordAuthSignInMethod
  31. NS_SWIFT_NAME(EmailPasswordAuthSignInMethod);
  32. /** @class FIREmailAuthProvider
  33. @brief A concrete implementation of `FIRAuthProvider` for Email & Password Sign In.
  34. */
  35. NS_SWIFT_NAME(EmailAuthProvider)
  36. @interface FIREmailAuthProvider : NSObject
  37. /** @fn credentialWithEmail:password:
  38. @brief Creates an `FIRAuthCredential` for an email & password sign in.
  39. @param email The user's email address.
  40. @param password The user's password.
  41. @return A FIRAuthCredential containing the email & password credential.
  42. */
  43. + (FIRAuthCredential *)credentialWithEmail:(NSString *)email password:(NSString *)password;
  44. /** @fn credentialWithEmail:Link:
  45. @brief Creates an `FIRAuthCredential` for an email & link sign in.
  46. @param email The user's email address.
  47. @param link The email sign-in link.
  48. @return A FIRAuthCredential containing the email & link credential.
  49. */
  50. + (FIRAuthCredential *)credentialWithEmail:(NSString *)email link:(NSString *)link;
  51. /** @fn init
  52. @brief This class is not meant to be initialized.
  53. */
  54. - (instancetype)init NS_UNAVAILABLE;
  55. @end
  56. NS_ASSUME_NONNULL_END