From a5f5ed3cd16196b3f069b859e3efb938e932f883 Mon Sep 17 00:00:00 2001 From: Kyle Matthew Hedden Date: Tue, 5 Jul 2022 18:03:13 -0400 Subject: [PATCH 1/3] Update session keep alive to account for all new session tokens outside of BAU server session. --- MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m index 7a52182..9c56d99 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadObject.m @@ -61,8 +61,11 @@ } - (BOOL)extendsAppSession { - NSNumber *extendSessionFlag = [self.responseInfoMap optionalNumberForKey:@"appSessionExtended"]; - return extendSessionFlag == nil || [extendSessionFlag boolValue]; // Default to YES if the key does not exist. + //NSNumber *extendSessionFlag = [self.responseInfoMap optionalNumberForKey:@"appSessionExtended"]; + //return extendSessionFlag == nil || [extendSessionFlag boolValue]; // Default to YES if the key does not exist. + + // With the introduciton of NSA and OIDC tokens, we can no longer rely on BAU network touches to update our server session. + return NO; } #pragma mark - Deprecated From ded68fe51f5f2bd8ad59dfba002b571fd9a40e1f Mon Sep 17 00:00:00 2001 From: Kyle Matthew Hedden Date: Wed, 13 Jul 2022 23:31:43 -0400 Subject: [PATCH 2/3] reduce cookie noise --- MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m index 27043bf..3985236 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m @@ -311,8 +311,8 @@ } MVMCoreLog(@"********************************* Cookie Sent *********************************"); - [[[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies] enumerateObjectsUsingBlock:^(NSHTTPCookie * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - MVMCoreLog(@"Cookie Name: %@, Cookie Value: %@",obj.name, obj.value); + [[[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:request.URL] enumerateObjectsUsingBlock:^(NSHTTPCookie * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + MVMCoreLog(@"Cookie Name: %@, Cookie Value: %@, Domain: %@", obj.name, obj.value, obj.domain); }]; [[NSNotificationCenter defaultCenter] postNotificationName:MVMCoreNotificationGoingToServer object:nil]; From 27c5be04154138ed49c15d00b8cf5a4534b1c64a Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Mon, 18 Jul 2022 17:45:28 -0400 Subject: [PATCH 3/3] Deprecated function removal. --- .../ActionHandling/MVMCoreActionHandler.h | 5 ---- .../ActionHandling/MVMCoreActionHandler.m | 11 -------- .../MVMCore/LoadHandling/MVMCoreLoadHandler.h | 8 ------ .../MVMCore/LoadHandling/MVMCoreLoadHandler.m | 16 ------------ .../MVMCoreLoadRequestOperation.h | 5 ---- .../MVMCoreLoadRequestOperation.m | 26 ------------------- 6 files changed, 71 deletions(-) diff --git a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.h b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.h index 068b018..2f46e22 100644 --- a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.h +++ b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.h @@ -94,9 +94,4 @@ extern NSString * _Nonnull const KeyActionTypeOpen; /// Logs the error. - (void)defaultHandleActionError:(nonnull MVMCoreErrorObject *)error additionalData:(nullable NSDictionary *)additionalData; -#pragma mark - Deprecated - -/// Convenience function for handling actions. This will pull action and pageInfo out of the dictionary and call handleAction: actionInformation: with those values -- (void)handleActionWithDictionary:(nullable NSDictionary *)dictionary additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject *)delegate __deprecated; - @end diff --git a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m index cac409d..fb51e8c 100644 --- a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m +++ b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m @@ -483,15 +483,4 @@ NSString * const KeyActionTypeOpen = @"openPage"; } } -#pragma mark - Deprecated - -- (void)handleActionWithDictionary:(nullable NSDictionary *)dictionary additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject *)delegate { - - DelegateObject *delegateObject = [[DelegateObject alloc] init]; - delegateObject.actionDelegate = delegate; - delegateObject.presentationDelegate = delegate; - delegateObject.loadDelegate = delegate; - [self handleActionWithDictionary:dictionary additionalData:additionalData delegateObject:delegateObject]; -} - @end diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.h b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.h index 3160903..84de194 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.h +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.h @@ -68,12 +68,4 @@ // By default, returns continue loading and decides not to throw an error. + (BOOL)defaultHandleModuleError:(nonnull NSString *)module loadObject:(nonnull MVMCoreLoadObject *)loadObject error:(nonnull MVMCoreErrorObject *)error; -#pragma mark - Deprecated - -// Loads a blocking request with the passed in parameters and data for the next page. Pass in the data to handle certain functions. -- (nonnull MVMCoreLoadRequestOperation *)loadRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject*)delegate __deprecated; - -// Loads a background request with the passed in parameters and data for the next page. Pass in the data to handle certain functions. -- (nonnull MVMCoreLoadRequestOperation *)loadBackgroundRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject*)delegate __deprecated; - @end diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m index 3985236..842d032 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler.m @@ -429,20 +429,4 @@ return YES; } -#pragma mark - Deprecated - -- (MVMCoreLoadRequestOperation *)loadRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject*)delegate { - - MVMCoreLoadRequestOperation *loadOperation = [[MVMCoreLoadRequestOperation alloc] initWithRequestParameters:requestParameters dataForPage:dataForPage delegate:delegate backgroundLoad:NO]; - [self.blockingLoadQueue addOperation:loadOperation]; - return loadOperation; -} - -- (MVMCoreLoadRequestOperation *)loadBackgroundRequest:(nonnull MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject*)delegate { - - MVMCoreLoadRequestOperation *loadOperation = [[MVMCoreLoadRequestOperation alloc] initWithRequestParameters:requestParameters dataForPage:dataForPage delegate:delegate backgroundLoad:YES]; - [self.backgroundLoadQueue addOperation:loadOperation]; - return loadOperation; -} - @end diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h index 158b991..ab87548 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h @@ -21,7 +21,6 @@ @property (nullable, strong, nonatomic) MVMCoreRequestParameters *requestParameters; @property (nullable, strong, nonatomic) MVMCoreLoadObject *loadObject; @property (nullable, strong, nonatomic) NSDictionary *dataForPage; -@property (nullable, strong, nonatomic) NSObject *delegate;// __deprecated; @property (nullable, strong, nonatomic) DelegateObject *delegateObject; @property (nonatomic) BOOL backgroundLoad; @property (nonatomic, getter=areDependenciesAdded) BOOL dependenciesAdded; @@ -105,8 +104,4 @@ * @param loadObject The load data **/ + (void)loadFinished:(nonnull MVMCoreLoadObject *)loadObject loadedViewController:(nullable UIViewController *)loadedViewController errorObject:(nullable MVMCoreErrorObject *)errorObject; -#pragma mark - Deprecated - -- (nullable instancetype)initWithRequestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject*)delegate backgroundLoad:(BOOL)backgroundLoad __deprecated; - @end diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m index 8d5280b..ed0da89 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m @@ -902,30 +902,4 @@ } } -#pragma mark - Deprecated - -- (void)setDelegateObject:(DelegateObject *)delegateObject { - _delegateObject = delegateObject; - _delegate = delegateObject.loadDelegate; -} - -- (void)setDelegate:(NSObject *)delegate { - _delegate = delegate; - if ([delegate respondsToSelector:@selector(delegateObject)]) { - _delegateObject = [delegate performSelector:@selector(delegateObject)]; - } else { - _delegateObject = [DelegateObject createWithDelegateForAll:delegate]; - } -} - -- (nullable instancetype)initWithRequestParameters:(nullable MVMCoreRequestParameters *)requestParameters dataForPage:(nullable NSDictionary *)dataForPage delegate:(nullable NSObject*)delegate backgroundLoad:(BOOL)backgroundLoad { - if (self = [super init]) { - self.requestParameters = requestParameters; - self.dataForPage = dataForPage; - self.delegate = delegate; - self.backgroundLoad = backgroundLoad; - } - return self; -} - @end