commit | author | age
|
a0a843
|
1 |
// |
H |
2 |
// TWTRAuthConfigSessionsValidator.h |
|
3 |
// TwitterCore |
|
4 |
// |
|
5 |
// Created by Chase Latta on 10/8/15. |
|
6 |
// Copyright © 2015 Twitter Inc. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
@class TWTRAuthConfig; |
|
11 |
@class TWTRAuthConfigStore; |
|
12 |
@protocol TWTRSessionStore_Private; |
|
13 |
|
|
14 |
NS_ASSUME_NONNULL_BEGIN |
|
15 |
|
|
16 |
@interface TWTRAuthConfigSessionsValidator : NSObject |
|
17 |
|
|
18 |
- (instancetype)init NS_UNAVAILABLE; |
|
19 |
|
|
20 |
- (instancetype)initWithConfigStore:(TWTRAuthConfigStore *)configStore sessionStore:(id<TWTRSessionStore_Private>)sessionStore; |
|
21 |
|
|
22 |
/** |
|
23 |
* Calling this method will check that the auth config used by the |
|
24 |
* session store matches the config stored in the config store. |
|
25 |
* If they do not match it will clear the sessions from the session store. |
|
26 |
* It will then store the session store's config in the config store. |
|
27 |
* @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. |
|
28 |
*/ |
|
29 |
- (void)validateSessionStoreContainsValidAuthConfig; |
|
30 |
|
|
31 |
@end |
|
32 |
|
|
33 |
NS_ASSUME_NONNULL_END |