FIROAuthCredential_Internal.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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/Public/FirebaseAuth/FIROAuthCredential.h"
  18. @class FIRVerifyAssertionResponse;
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @extension FIROAuthCredential
  21. @brief Internal implementation of FIRAuthCredential for generic credentials.
  22. */
  23. @interface FIROAuthCredential ()
  24. /** @property OAuthResponseURLString
  25. @brief A string representation of the response URL corresponding to this OAuthCredential.
  26. */
  27. @property(nonatomic, readonly, nullable) NSString *OAuthResponseURLString;
  28. /** @property sessionID
  29. @brief The session ID used when completing the headful-lite flow.
  30. */
  31. @property(nonatomic, readonly, nullable) NSString *sessionID;
  32. /** @property pendingToken
  33. @brief The pending token used when completing the headful-lite flow.
  34. */
  35. @property(nonatomic, readonly, nullable) NSString *pendingToken;
  36. /** @property fullName
  37. @brief The full name of the user associated with this OAuthCredential.
  38. */
  39. @property(nonatomic, readonly, nullable) NSPersonNameComponents *fullName;
  40. /** @fn initWithProviderId:IDToken:rawNonce:accessToken:secret:fullName:pendingToken
  41. @brief Designated initializer.
  42. @param providerID The provider ID associated with the credential being created.
  43. @param IDToken The ID Token associated with the credential being created.
  44. @param rawNonce The raw nonce associated with the Auth credential being created.
  45. @param accessToken The access token associated with the credential being created.
  46. @param secret The secret associated with the credential being created.
  47. @param fullName The full name associated with the credential being created.
  48. @param pendingToken The pending token associated with the credential being created.
  49. */
  50. - (instancetype)initWithProviderID:(NSString *)providerID
  51. IDToken:(nullable NSString *)IDToken
  52. rawNonce:(nullable NSString *)rawNonce
  53. accessToken:(nullable NSString *)accessToken
  54. secret:(nullable NSString *)secret
  55. fullName:(nullable NSPersonNameComponents *)fullName
  56. pendingToken:(nullable NSString *)pendingToken NS_DESIGNATED_INITIALIZER;
  57. /** @fn initWithProviderId:sessionID:OAuthResponseURLString:
  58. @brief Intitializer which takes a sessionID and an OAuthResponseURLString.
  59. @param providerID The provider ID associated with the credential being created.
  60. @param sessionID The session ID used when completing the headful-lite flow.
  61. @param OAuthResponseURLString The error that occurred if any.
  62. */
  63. - (instancetype)initWithProviderID:(NSString *)providerID
  64. sessionID:(NSString *)sessionID
  65. OAuthResponseURLString:(NSString *)OAuthResponseURLString;
  66. /** @fn initWithVerifyAssertionResponse
  67. @brief Intitializer which takes an verifyAssertion response.
  68. @param response The verifyAssertion Response to create the credential instance.
  69. */
  70. - (nullable instancetype)initWithVerifyAssertionResponse:(FIRVerifyAssertionResponse *)response;
  71. @end
  72. NS_ASSUME_NONNULL_END