commit | author | age
|
655e66
|
1 |
/* |
H |
2 |
* Copyright (C) 2017 Twitter, Inc. |
|
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 |
*/ |
|
17 |
|
|
18 |
/** |
|
19 |
This header is private to the Twitter Core SDK and not exposed for public SDK consumption |
|
20 |
*/ |
a0a843
|
21 |
|
H |
22 |
#import <Foundation/Foundation.h> |
|
23 |
@class TWTRAuthConfig; |
|
24 |
@class TWTRAuthConfigStore; |
|
25 |
@protocol TWTRSessionStore_Private; |
|
26 |
|
|
27 |
NS_ASSUME_NONNULL_BEGIN |
|
28 |
|
|
29 |
@interface TWTRAuthConfigSessionsValidator : NSObject |
|
30 |
|
|
31 |
- (instancetype)init NS_UNAVAILABLE; |
|
32 |
|
|
33 |
- (instancetype)initWithConfigStore:(TWTRAuthConfigStore *)configStore sessionStore:(id<TWTRSessionStore_Private>)sessionStore; |
|
34 |
|
|
35 |
/** |
|
36 |
* Calling this method will check that the auth config used by the |
|
37 |
* session store matches the config stored in the config store. |
|
38 |
* If they do not match it will clear the sessions from the session store. |
|
39 |
* It will then store the session store's config in the config store. |
|
40 |
* @note If the config store does not have a saved auth config the store will not be purged. If we did not do this all users would be logged out the first time this validator is used. |
|
41 |
*/ |
|
42 |
- (void)validateSessionStoreContainsValidAuthConfig; |
|
43 |
|
|
44 |
@end |
|
45 |
|
|
46 |
NS_ASSUME_NONNULL_END |