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 |
|
a0a843
|
18 |
#import <Foundation/Foundation.h> |
H |
19 |
@class TWTRAuthConfig; |
|
20 |
@class TWTRAuthConfigStore; |
|
21 |
@protocol TWTRSessionStore_Private; |
|
22 |
|
|
23 |
NS_ASSUME_NONNULL_BEGIN |
|
24 |
|
|
25 |
@interface TWTRAuthConfigSessionsValidator : NSObject |
|
26 |
|
|
27 |
- (instancetype)init NS_UNAVAILABLE; |
|
28 |
|
|
29 |
- (instancetype)initWithConfigStore:(TWTRAuthConfigStore *)configStore sessionStore:(id<TWTRSessionStore_Private>)sessionStore; |
|
30 |
|
|
31 |
/** |
|
32 |
* Calling this method will check that the auth config used by the |
|
33 |
* session store matches the config stored in the config store. |
|
34 |
* If they do not match it will clear the sessions from the session store. |
|
35 |
* It will then store the session store's config in the config store. |
|
36 |
* @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. |
|
37 |
*/ |
|
38 |
- (void)validateSessionStoreContainsValidAuthConfig; |
|
39 |
|
|
40 |
@end |
|
41 |
|
|
42 |
NS_ASSUME_NONNULL_END |