GIDAuthFlow.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright 2024 Google LLC
  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 "GoogleSignIn/Sources/GIDCallbackQueue.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. @class OIDAuthState;
  20. @class GIDProfileData;
  21. /// The callback queue used for authentication flow.
  22. @interface GIDAuthFlow : GIDCallbackQueue
  23. /// A representation of the state of the OAuth session for this instance.
  24. @property(nonatomic, strong, nullable) OIDAuthState *authState;
  25. /// The error thrown from the OAuth session encountered for this instance.
  26. @property(nonatomic, strong, nullable) NSError *error;
  27. /// The EMM support version.
  28. @property(nonatomic, copy, nullable) NSString *emmSupport;
  29. /// The profile data extracted from the ID token.
  30. @property(nonatomic, nullable) GIDProfileData *profileData;
  31. /// Initialize a `GIDAuthFlow` object by specifying all available properties.
  32. ///
  33. /// @param authState The configuration to be used.
  34. /// @param error The configuration to be used.
  35. /// @param emmSupport The configuration to be used.
  36. /// @param profileData The configuration to be used.
  37. /// @return An initialized `GIDAuthFlow` instance.
  38. - (instancetype)initWithAuthState:(nullable OIDAuthState *)authState
  39. error:(nullable NSError *)error
  40. emmSupport:(nullable NSString *)emmSupport
  41. profileData:(nullable GIDProfileData *)profileData
  42. NS_DESIGNATED_INITIALIZER;
  43. /// Initialize a `GIDAuthFlow` object by calling the designated initializer with `nil` values.
  44. ///
  45. /// @return An initialized `GIDAuthFlow` instance.
  46. - (instancetype)init;
  47. @end
  48. NS_ASSUME_NONNULL_END