FBSDKAuthenticationStatusUtility.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. /* FBSDKAuthenticationTokenStatusChecker_h */
  9. #if !TARGET_OS_TV
  10. #import <Foundation/Foundation.h>
  11. #import <FBSDKCoreKit/FBSDKAccessTokenProviding.h>
  12. #import <FBSDKCoreKit/FBSDKAuthenticationTokenProviding.h>
  13. #import <FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.h>
  14. @protocol FBSDKProfileProviding;
  15. NS_ASSUME_NONNULL_BEGIN
  16. /**
  17. Internal type exposed to facilitate transition to Swift.
  18. API Subject to change or removal without warning. Do not use.
  19. @warning INTERNAL - DO NOT USE
  20. */
  21. NS_SWIFT_NAME(_AuthenticationStatusUtility)
  22. @interface FBSDKAuthenticationStatusUtility : NSObject
  23. @property (class, nullable, nonatomic) Class<FBSDKProfileProviding> profileSetter;
  24. @property (class, nullable, nonatomic) id<FBSDKURLSessionProviding> sessionDataTaskProvider;
  25. @property (class, nullable, nonatomic) Class<FBSDKAccessTokenProviding> accessTokenWallet;
  26. @property (class, nullable, nonatomic) Class<FBSDKAuthenticationTokenProviding> authenticationTokenWallet;
  27. /// Sets dependencies. This must be called during SDK initialization.
  28. + (void)configureWithProfileSetter:(Class<FBSDKProfileProviding>)profileSetter
  29. sessionDataTaskProvider:(id<FBSDKURLSessionProviding>)sessionDataTaskProvider
  30. accessTokenWallet:(Class<FBSDKAccessTokenProviding>)accessTokenWallet
  31. authenticationTokenWallet:(Class<FBSDKAuthenticationTokenProviding>)authenticationWallet
  32. NS_SWIFT_NAME(configure(profileSetter:sessionDataTaskProvider:accessTokenWallet:authenticationTokenWallet:));
  33. /**
  34. Fetches the latest authentication status from server. This will invalidate
  35. the current user session if the returned status is not authorized.
  36. */
  37. + (void)checkAuthenticationStatus;
  38. #if DEBUG
  39. + (void)resetClassDependencies;
  40. #endif
  41. @end
  42. NS_ASSUME_NONNULL_END
  43. #endif