lpw
2024-04-15 97fc0a41111c5a929ee8be9d6511775697ffa760
commit | author | age
e0ec42 1 /*
L 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
9 /* FBSDKAuthenticationTokenStatusChecker_h */
10
11 #if !TARGET_OS_TV
12
13 #import <Foundation/Foundation.h>
14
15 #import <FBSDKCoreKit/FBSDKAccessTokenProviding.h>
16 #import <FBSDKCoreKit/FBSDKAuthenticationTokenProviding.h>
17 #import <FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.h>
18
19 @protocol FBSDKProfileProviding;
20
21 NS_ASSUME_NONNULL_BEGIN
22
23 /**
24  Internal type exposed to facilitate transition to Swift.
25  API Subject to change or removal without warning. Do not use.
26
27  @warning INTERNAL - DO NOT USE
28  */
29 NS_SWIFT_NAME(_AuthenticationStatusUtility)
30 @interface FBSDKAuthenticationStatusUtility : NSObject
31
32 @property (class, nullable, nonatomic) Class<FBSDKProfileProviding> profileSetter;
33 @property (class, nullable, nonatomic) id<FBSDKURLSessionProviding> sessionDataTaskProvider;
34 @property (class, nullable, nonatomic) Class<FBSDKAccessTokenProviding> accessTokenWallet;
35 @property (class, nullable, nonatomic) Class<FBSDKAuthenticationTokenProviding> authenticationTokenWallet;
36
37 /// Sets dependencies. This must be called during SDK initialization.
38 + (void)configureWithProfileSetter:(Class<FBSDKProfileProviding>)profileSetter
39            sessionDataTaskProvider:(id<FBSDKURLSessionProviding>)sessionDataTaskProvider
40                  accessTokenWallet:(Class<FBSDKAccessTokenProviding>)accessTokenWallet
41          authenticationTokenWallet:(Class<FBSDKAuthenticationTokenProviding>)authenticationWallet
42 NS_SWIFT_NAME(configure(profileSetter:sessionDataTaskProvider:accessTokenWallet:authenticationTokenWallet:));
43
44 /**
45  Fetches the latest authentication status from server. This will invalidate
46   the current user session if the returned status is not authorized.
47  */
48 + (void)checkAuthenticationStatus;
49
50 #if DEBUG
51
52 + (void)resetClassDependencies;
53
54 #endif
55
56 @end
57
58 NS_ASSUME_NONNULL_END
59
60 #endif