FIRPhoneMultiFactorGenerator.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright 2019 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/LICENSE2.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 "FIRPhoneAuthCredential.h"
  18. #import "FIRPhoneMultiFactorAssertion.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @class FIRPhoneMultiFactorGenerator
  21. @brief The data structure used to help initialize an assertion for a second factor entity to the
  22. Firebase Auth/CICP server. Depending on the type of second factor, this will help generate
  23. the assertion.
  24. This class is available on iOS only.
  25. */
  26. NS_SWIFT_NAME(PhoneMultiFactorGenerator) API_UNAVAILABLE(macos, tvos, watchos)
  27. @interface FIRPhoneMultiFactorGenerator : NSObject
  28. /** @fn assertionWithCredential:
  29. @brief Initializes the MFA assertion to confirm ownership of the phone second factor. Note that
  30. this API is used for both enrolling and signing in with a phone second factor.
  31. @param phoneAuthCredential The phone auth credential used for multi factor flows.
  32. */
  33. + (FIRPhoneMultiFactorAssertion *)assertionWithCredential:
  34. (FIRPhoneAuthCredential *)phoneAuthCredential;
  35. @end
  36. NS_ASSUME_NONNULL_END