TWTRSessionStoreRefreshCompletion Block Reference
Declared in | TWTRSessionStore.h |
---|
Block Definition
TWTRSessionStoreRefreshCompletion
Completion block called when a session refresh succeeds or fails.
typedef void (^TWTRSessionStoreRefreshCompletion) (id _Nullable, refreshedSession ,, NSError *_Nullable, error ), ; @protocol, TWTRSessionRefreshingStore <, NSObject >, - (, void ), refreshSessionClass :, ( Class, ) sessionClass, sessionID :, ( nullable, NSString *), sessionID completion, : (, TWTRSessionStoreRefreshCompletion ), completion ;, - (, BOOL ), isExpiredSession :, ( id, ) session, response :, ( NSHTTPURLResponse, * ), response ;, - (, BOOL ), isExpiredSession :, ( id, ) session, error :, ( NSError, * ), error ;, @end #, pragma mark, - TWTRUserSessionStore, Protocol typedef, void (, ^ TWTRSessionStoreSaveCompletion, ) (, id <, TWTRAuthSession >, _Nullable session, NSError *_Nullable, error ), ; typedef, void (, ^ TWTRSessionStoreBatchFetchCompletion, ) (, NSArray *sessions, ) ;, typedef void, ( ^, TWTRSessionStoreDeleteCompletion ), ( id, < TWTRAuthSession, > _Nullable, session ), ; @protocol, TWTRUserSessionStore <, NSObject >, - (, void ), saveSession :, ( id, < TWTRAuthSession, > ), session completion, : (, TWTRSessionStoreSaveCompletion ), completion ;, - (, void ), saveSessionWithAuthToken :, ( NSString, * ), authToken authTokenSecret, : (, NSString *), authTokenSecret completion, : (, TWTRSessionStoreSaveCompletion ), completion ;, - (, nullable id, < TWTRAuthSession, > ), sessionForUserID :, ( NSString, * ), userID ;, - (, NSArray *), existingUserSessions ;, - (, BOOL ), hasLoggedInUsers ;, - (, nullable id, < TWTRAuthSession, > ), session ;, - (, void ), logOutUserID :, ( NSString, * ), userID ;, @end #, pragma mark, - TWTRGuestSessionStore, Protocol typedef, void (, ^ TWTRSessionGuestLogInCompletion, ) (, TWTRGuestSession *_Nullable, guestSession ,, NSError *_Nullable, error ), ; @protocol, TWTRGuestSessionStore <, NSObject >, - (, void ), fetchGuestSessionWithCompletion :, ( TWTRSessionGuestLogInCompletion, ) completion, ; @end, # pragma, mark -, Composite TWTRSessionStore, Protocol @protocol, TWTRSessionStore <, TWTRUserSessionStore ,, TWTRGuestSessionStore ,, TWTRSessionRefreshingStore >, @property (, nonatomic ,, readonly ), TWTRAuthConfig *authConfig, ; @end, # pragma, mark -, Concrete Session, Store Class, @interface TWTRSessionStore, : NSObject, < TWTRSessionStore, > -, ( instancetype, ) init, NS_UNAVAILABLE ;, - (, void ), reloadSessionStore ;, - (, void ), saveOauthToken :, ( NSString, * ), token ;, - (, BOOL ), isValidOauthToken :, ( NSString, * ), token ;, @end NS_ASSUME_NONNULL_END)
Declared In
TWTRSessionStore.h