GIDSignIn_Private.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright 2021 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 "GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h"
  17. NS_ASSUME_NONNULL_BEGIN
  18. @class GIDGoogleUser;
  19. @class GIDSignInInternalOptions;
  20. // Represents a completion block that takes a `GIDUserAuth` on success or an error if the operation
  21. // was unsuccessful.
  22. typedef void (^GIDUserAuthCompletion)(GIDUserAuth *_Nullable userAuth, NSError *_Nullable error);
  23. // Private |GIDSignIn| methods that are used internally in this SDK and other Google SDKs.
  24. @interface GIDSignIn ()
  25. // Private initializer for |GIDSignIn|.
  26. - (instancetype)initPrivate;
  27. // Authenticates with extra options.
  28. - (void)signInWithOptions:(GIDSignInInternalOptions *)options;
  29. // Restores a previously authenticated user from the keychain synchronously without refreshing
  30. // the access token or making a userinfo request. The currentUser.profile will be nil unless
  31. // the profile data can be extracted from the ID token.
  32. //
  33. // @return NO if there is no user restored from the keychain.
  34. - (BOOL)restorePreviousSignInNoRefresh;
  35. @end
  36. NS_ASSUME_NONNULL_END