Skip to content

Commit 5ab5435

Browse files
authored
Merge pull request #1448 from AzureAD/oldalton/automation_tweaks
Clear cookies from the new SSO extension cookie storage
2 parents 5ec6761 + b66b616 commit 5ab5435

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

IdentityCore/tests/automation/ui_app_lib/MSIDClearCookiesTestAction.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ - (void)performActionWithParameters:(__unused NSDictionary *)parameters
7272
modifiedSince:[NSDate dateWithTimeIntervalSince1970:0]
7373
completionHandler:^{}];
7474

75+
NSHTTPCookieStorage *separatedStorage = [NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier:@"group.com.microsoft.azureauthenticator.sso"];
76+
77+
for (NSHTTPCookie *cookie in separatedStorage.cookies)
78+
{
79+
[separatedStorage deleteCookie:cookie];
80+
count++;
81+
}
82+
7583
MSIDAutomationTestResult *testResult = [[MSIDAutomationTestResult alloc] initWithAction:self.actionIdentifier
7684
success:YES
7785
additionalInfo:@{@"cleared_items_count":@(count)}];

0 commit comments

Comments
 (0)