Skip to content

Commit 6091460

Browse files
authored
Merge pull request #1475 from AzureAD/release/1.8.0
Release/1.8.0
2 parents f604806 + 67a3a48 commit 6091460

30 files changed

+506
-23
lines changed

IdentityCore/src/MSIDBrokerConstants.h

+2
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,5 @@ extern NSString * _Nonnull const MSID_CREATE_NEW_URL_SESSION;
104104
extern NSString * _Nonnull const MSID_HTTP_CONNECTION_VALUE;
105105
extern NSString * _Nonnull const MSID_FORCE_REFRESH_KEY;
106106

107+
extern BOOL MSID_SUPPRESS_CAMERA_CONSENT_PROMPT_IN_WEBVIEW;
108+

IdentityCore/src/MSIDBrokerConstants.m

+3
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,6 @@
104104
// Http header
105105
NSString *const MSID_HTTP_CONNECTION = @"Connection";
106106
NSString *const MSID_HTTP_CONNECTION_VALUE = @"close";
107+
108+
// Non-constant
109+
BOOL MSID_SUPPRESS_CAMERA_CONSENT_PROMPT_IN_WEBVIEW = NO;

IdentityCore/src/MSIDError.h

+20
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ typedef NS_ENUM(NSInteger, MSIDErrorCode)
171171
*/
172172

173173
MSIDErrorServerUnhandledResponse = -51500,
174+
// http status Code 403 or 404
175+
MSIDErrorUnexpectedHttpResponse = -51501,
174176

175177
/*!
176178
=========================================================
@@ -334,6 +336,24 @@ typedef NS_ENUM(NSInteger, MSIDErrorCode)
334336

335337
// JIT - Error Handling config invalid or not found
336338
MSIDErrorJITErrorHandlingConfigNotFound = -51839,
339+
340+
// Error is thrown when PSSO biometric policy flag mismatches with the config value
341+
MSIDErrorPSSOBiometricPolicyMismatch = -51840,
342+
343+
// Error is thrown when non ENtra passkey extension tries to access the passkey
344+
MSIDErrorPSSOInvalidPasskeyExtension = -51841,
345+
346+
// Error thrown when psso save login config operation fails
347+
MSIDErrorPSSOSaveLoginConfigFailure = -51842,
348+
349+
// Error is thrown when passkey accessed without biometric when h/w biometric policy configured
350+
MSIDErrorPSSOPasskeyLAError = -51843,
351+
352+
// Error is thrown when PSSO user registration attempted with no biometrics configured and sekey biometric policy is configured
353+
MSIDErrorPSSOBiometricsNotEnrolled = -51844,
354+
355+
// Error is thrown when PSSO user registration attempted with no biometrics available and sekey biometric policy is configured
356+
MSIDErrorPSSOBiometricsNotAvailable = -51845,
337357

338358
// Throttling errors
339359
MSIDErrorThrottleCacheNoRecord = -51900,

IdentityCore/src/MSIDError.m

+22-1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ MSIDErrorCode MSIDErrorCodeForOAuthErrorWithSubErrorCode(NSString *oauthError, M
207207
@(MSIDErrorDeviceNotPSSORegistered),
208208
@(MSIDErrorPSSOKeyIdMismatch),
209209
@(MSIDErrorJITErrorHandlingConfigNotFound),
210+
@(MSIDErrorPSSOBiometricPolicyMismatch),
211+
@(MSIDErrorPSSOInvalidPasskeyExtension),
212+
@(MSIDErrorPSSOSaveLoginConfigFailure),
213+
@(MSIDErrorPSSOPasskeyLAError),
214+
@(MSIDErrorPSSOBiometricsNotEnrolled),
215+
@(MSIDErrorPSSOBiometricsNotAvailable),
210216
],
211217
MSIDOAuthErrorDomain : @[// Server Errors
212218
@(MSIDErrorServerOauth),
@@ -224,7 +230,8 @@ MSIDErrorCode MSIDErrorCodeForOAuthErrorWithSubErrorCode(NSString *oauthError, M
224230
@(MSIDErrorServerError),
225231
],
226232
MSIDHttpErrorCodeDomain : @[
227-
@(MSIDErrorServerUnhandledResponse)
233+
@(MSIDErrorServerUnhandledResponse),
234+
@(MSIDErrorUnexpectedHttpResponse)
228235
]
229236

230237
// TODO: add new codes here
@@ -301,6 +308,8 @@ void MSIDFillAndLogError(NSError **error, MSIDErrorCode errorCode, NSString *err
301308
// HTTP errors
302309
case MSIDErrorServerUnhandledResponse:
303310
return @"MSIDErrorServerUnhandledResponse";
311+
case MSIDErrorUnexpectedHttpResponse:
312+
return @"MSIDErrorUnexpectedHttpResponse";
304313
// Authority validation errors
305314
case MSIDErrorAuthorityValidation:
306315
return @"MSIDErrorAuthorityValidation";
@@ -415,6 +424,18 @@ void MSIDFillAndLogError(NSError **error, MSIDErrorCode errorCode, NSString *err
415424
return @"MSIDErrorDeviceNotPSSORegistered";
416425
case MSIDErrorPSSOKeyIdMismatch:
417426
return @"MSIDErrorPSSOKeyIdMismatch";
427+
case MSIDErrorPSSOBiometricPolicyMismatch:
428+
return @"MSIDErrorPSSOBiometricPolicyMismatch";
429+
case MSIDErrorPSSOInvalidPasskeyExtension:
430+
return @"MSIDErrorPSSOInvalidPasskeyExtension";
431+
case MSIDErrorPSSOSaveLoginConfigFailure:
432+
return @"MSIDErrorPSSOSaveLoginConfigFailure";
433+
case MSIDErrorPSSOPasskeyLAError:
434+
return @"MSIDErrorPSSOPasskeyLAError";
435+
case MSIDErrorPSSOBiometricsNotEnrolled:
436+
return @"MSIDErrorPSSOBiometricsNotEnrolled";
437+
case MSIDErrorPSSOBiometricsNotAvailable:
438+
return @"MSIDErrorPSSOBiometricsNotAvailable";
418439
// Throttling errors
419440
case MSIDErrorThrottleCacheNoRecord:
420441
return @"MSIDErrorThrottleCacheNoRecord";

IdentityCore/src/broker_operation/response/MSIDDeviceInfo.h

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ typedef NS_ENUM(NSInteger, MSIDPlatformSSOStatus)
4646
MSIDPlatformSSONotEnabled = 0, //Platform SSO Not enabled in SSO Config
4747
MSIDPlatformSSOEnabledNotRegistered = 1, //Platform SSO Enabled in sso config , but not Registered
4848
MSIDPlatformSSOEnabledAndRegistered = 2, //Platform SSO Enabled in sso config and registered
49+
MSIDPlatformSSORegistrationNeedsRepair = 3, //Platform registration needs to be repaired
4950
};
5051

5152
typedef NS_ENUM(NSInteger, MSIDPreferredAuthMethod)

IdentityCore/src/broker_operation/response/MSIDDeviceInfo.m

+3
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ - (NSString *)platformSSOStatusStringFromEnum:(MSIDPlatformSSOStatus)platformSSO
176176
return @"platformSSOEnabledNotRegistered";
177177
case MSIDPlatformSSOEnabledAndRegistered:
178178
return @"platformSSOEnabledAndRegistered";
179+
case MSIDPlatformSSORegistrationNeedsRepair:
180+
return @"platformSSORegistrationNeedsRepair";
179181

180182
default:
181183
return nil;
@@ -187,6 +189,7 @@ - (MSIDPlatformSSOStatus)platformSSOStatusEnumFromString:(NSString *)platformSSO
187189
if ([platformSSOStatusString isEqualToString:@"platformSSONotEnabled"]) return MSIDPlatformSSONotEnabled;
188190
if ([platformSSOStatusString isEqualToString:@"platformSSOEnabledNotRegistered"]) return MSIDPlatformSSOEnabledNotRegistered;
189191
if ([platformSSOStatusString isEqualToString:@"platformSSOEnabledAndRegistered"]) return MSIDPlatformSSOEnabledAndRegistered;
192+
if ([platformSSOStatusString isEqualToString:@"platformSSORegistrationNeedsRepair"]) return MSIDPlatformSSORegistrationNeedsRepair;
190193

191194
return MSIDPlatformSSONotEnabled;
192195
}

IdentityCore/src/cache/accessor/MSIDDefaultTokenCacheAccessor.m

+4-1
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,10 @@ - (BOOL)saveAccount:(MSIDAccount *)account
12771277
}
12781278
else
12791279
{
1280-
[noReturnAccountsSet addObject:accountCacheItem.username];
1280+
if (accountCacheItem.username)
1281+
{
1282+
[noReturnAccountsSet addObject:accountCacheItem.username];
1283+
}
12811284
}
12821285
}
12831286

IdentityCore/src/logger/MSIDMaskedUsernameLogParameter.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ - (NSString *)maskedDescription
4949
domain = [stringValue substringFromIndex:emailIndex.location + 1];
5050
}
5151

52-
return [NSString stringWithFormat:@"auth.placeholder-%@__%@", [username msidSecretLoggingHash], domain];
52+
return [NSString stringWithFormat:@"auth.placeholder-%@__%@", [username.lowercaseString msidSecretLoggingHash], domain.lowercaseString];
5353
}
5454

5555
return [self.parameterValue msidSecretLoggingHash];

IdentityCore/src/network/error_handler/MSIDAADRequestErrorHandler.m

+7-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,13 @@ - (void)handleError:(NSError *)error
150150
}
151151
}
152152

153-
NSError *httpError = MSIDCreateError(MSIDHttpErrorCodeDomain, MSIDErrorServerUnhandledResponse, errorDescription, nil, nil, nil, context.correlationId, additionalInfo, YES);
153+
NSError *httpUnderlyingError = nil;
154+
if (httpResponse.statusCode == 403 || httpResponse.statusCode == 404)
155+
{
156+
httpUnderlyingError = MSIDCreateError(MSIDHttpErrorCodeDomain, MSIDErrorUnexpectedHttpResponse, errorDescription, nil, nil, nil, context.correlationId, nil, YES);
157+
}
158+
159+
NSError *httpError = MSIDCreateError(MSIDHttpErrorCodeDomain, MSIDErrorServerUnhandledResponse, errorDescription, nil, nil, httpUnderlyingError, context.correlationId, additionalInfo, YES);
154160

155161
if (completionBlock) completionBlock(nil, httpError);
156162
}

IdentityCore/src/webview/embeddedWebview/MSIDOAuth2EmbeddedWebviewController.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
typedef void (^MSIDNavigationResponseBlock)(NSHTTPURLResponse *response);
3939

4040
@interface MSIDOAuth2EmbeddedWebviewController :
41-
MSIDWebviewUIController <MSIDWebviewInteracting, WKNavigationDelegate>
41+
MSIDWebviewUIController <MSIDWebviewInteracting, WKNavigationDelegate, WKUIDelegate>
4242

4343
typedef NSURLRequest *(^MSIDExternalDecidePolicyForBrowserActionBlock)(MSIDOAuth2EmbeddedWebviewController *webView, NSURL *url);
4444

IdentityCore/src/webview/embeddedWebview/MSIDOAuth2EmbeddedWebviewController.m

+21
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ -(void)dealloc
108108
{
109109
[self.webView setNavigationDelegate:nil];
110110
}
111+
if ([self.webView.UIDelegate isEqual:self])
112+
{
113+
[self.webView setUIDelegate:nil];
114+
}
111115

112116
self.webView = nil;
113117
}
@@ -175,6 +179,7 @@ - (BOOL)loadView:(NSError *__autoreleasing*)error
175179
BOOL result = [super loadView:error];
176180

177181
self.webView.navigationDelegate = self;
182+
self.webView.UIDelegate = self;
178183

179184
#if !EXCLUDE_FROM_MSALCPP
180185
#if DEBUG
@@ -479,6 +484,22 @@ - (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavig
479484
}
480485
}
481486

487+
- (void) webView:(WKWebView *)webView
488+
requestMediaCapturePermissionForOrigin:(WKSecurityOrigin *)origin
489+
initiatedByFrame:(WKFrameInfo *)frame
490+
type:(WKMediaCaptureType)type
491+
decisionHandler:(void (^)(WKPermissionDecision decision))decisionHandler API_AVAILABLE(ios(15.0), macos(12.0))
492+
{
493+
if (MSID_SUPPRESS_CAMERA_CONSENT_PROMPT_IN_WEBVIEW && type == WKMediaCaptureTypeCamera)
494+
{
495+
decisionHandler(WKPermissionDecisionGrant);
496+
}
497+
else
498+
{
499+
decisionHandler(WKPermissionDecisionPrompt);
500+
}
501+
}
502+
482503
#pragma mark - Loading Indicator
483504

484505
- (void)onStartLoadingIndicator:(__unused id)sender

IdentityCore/tests/MSIDAADRequestErrorHandlerTests.m

+4
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ - (void)testHandleError_whenItIsNotServerError_shouldReturnStatusCodeAndHeaders
191191

192192
XCTAssertEqualObjects(returnError.domain, MSIDHttpErrorCodeDomain);
193193
XCTAssertEqual(returnError.code, MSIDErrorServerUnhandledResponse);
194+
NSError *underlyingError = returnError.userInfo[NSUnderlyingErrorKey];
195+
XCTAssertEqual(underlyingError.code, MSIDErrorUnexpectedHttpResponse);
194196
XCTAssertEqualObjects(returnError.userInfo[MSIDHTTPHeadersKey], @{@"headerKey":@"headerValue"});
195197

196198
XCTAssertNil(errorResponse);
@@ -275,6 +277,8 @@ - (void)testHandleError_whenItIsServerError_shouldReturnResponseCodeInError
275277

276278
XCTAssertEqualObjects(returnError.domain, MSIDHttpErrorCodeDomain);
277279
XCTAssertEqual(returnError.code, MSIDErrorServerUnhandledResponse);
280+
NSError *underlyingError = returnError.userInfo[NSUnderlyingErrorKey];
281+
XCTAssertEqual(underlyingError.code, MSIDErrorUnexpectedHttpResponse);
278282
XCTAssertEqualObjects(returnError.userInfo[MSIDHTTPResponseCodeKey], @"404");
279283
}
280284

IdentityCore/tests/MSIDMaskedUsernameLogParameterTests.m

+11
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,15 @@ - (void)testDescription_whenPIINotEnabled_andEmailParameterWithNoDomain_andSpace
8888
XCTAssertEqualObjects(description, @"auth.placeholder-9f86d081__ ");
8989
}
9090

91+
- (void)testDescription_whenPIINotEnabled_andEmailParameterWithDomain_shouldReturnSameMaskedValueForDifferentCase
92+
{
93+
[MSIDLogger sharedLogger].logMaskingLevel = MSIDLogMaskingSettingsMaskAllPII;
94+
MSIDMaskedUsernameLogParameter *logParameter = [[MSIDMaskedUsernameLogParameter alloc] initWithParameterValue:@"[email protected]"];
95+
MSIDMaskedUsernameLogParameter *logParameter1 = [[MSIDMaskedUsernameLogParameter alloc] initWithParameterValue:@"[email protected]"];
96+
NSString *description = [logParameter description];
97+
NSString *description1 = [logParameter1 description];
98+
XCTAssertEqualObjects(description, @"auth.placeholder-16f78a7d__domain.com");
99+
XCTAssertEqualObjects(description, description1);
100+
}
101+
91102
@end

IdentityCore/tests/MSIDTokenResponseTests.m

+7-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,13 @@ - (void)testJsonDictionary_whenAllPropertiesSetForSuccessResponse_shouldReturnJs
333333
XCTAssertEqualObjects(json[@"client_app_version"], @"1.0");
334334
XCTAssertEqualObjects(json[@"expires_in"], @"300");
335335
XCTAssertEqualObjects(json[@"expires_on"], @"1575635662");
336-
XCTAssertEqualObjects(json[@"id_token"], @"eyJhbGciOiJSUzI1NiIsImtpZCI6Il9raWRfdmFsdWUiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJpc3N1ZXIiLCJuYW1lIjoiVGVzdCBuYW1lIiwicHJlZmVycmVkX3VzZXJuYW1lIjoidXNlckBjb250b3NvLmNvbSIsInN1YiI6InN1YiJ9.eyJhbGciOiJSUzI1NiIsImtpZCI6Il9raWRfdmFsdWUiLCJ0eXAiOiJKV1QifQ");
336+
337+
NSArray *idTokenComponents = [json[@"id_token"] componentsSeparatedByString:@"."];
338+
XCTAssertEqual(idTokenComponents.count, 3);
339+
XCTAssertEqualObjects(idTokenComponents[0], @"eyJhbGciOiJSUzI1NiIsImtpZCI6Il9raWRfdmFsdWUiLCJ0eXAiOiJKV1QifQ");
340+
XCTAssertEqualObjects(idTokenComponents[1], @"eyJpc3MiOiJpc3N1ZXIiLCJuYW1lIjoiVGVzdCBuYW1lIiwicHJlZmVycmVkX3VzZXJuYW1lIjoidXNlckBjb250b3NvLmNvbSIsInN1YiI6InN1YiJ9");
341+
XCTAssertEqualObjects(idTokenComponents[2], @"eyJhbGciOiJSUzI1NiIsImtpZCI6Il9raWRfdmFsdWUiLCJ0eXAiOiJKV1QifQ");
342+
337343
XCTAssertEqualObjects(json[@"provider_type"], @"provider_aad_v2");
338344
XCTAssertEqualObjects(json[@"scope"], @"scope 1");
339345
XCTAssertEqualObjects(json[@"token_type"], @"Bearer");

IdentityCore/tests/automation/shared/MSIDAutomationTestRequest.h

+10
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ typedef NS_ENUM(NSUInteger, MSIDAutomationWPJRegistrationAPIMode)
3333
MSIDAutomationWPJRegistrationAPIModeCompanyPortal = 2 //Company Portal
3434
};
3535

36+
typedef NS_ENUM(NSInteger, MSIDAutomationWPJSSOExtensionSecureStorage)
37+
{
38+
MSIDAutomationWPJSSOExtensionNoValueFound = 0,
39+
MSIDAutomationWPJSSOExtensionValueNo = 1,
40+
MSIDAutomationWPJSSOExtensionValueYes = 2
41+
};
42+
3643
@interface MSIDAutomationTestRequest : NSObject <MSIDJsonSerializable>
3744

3845
@property (nonatomic, strong) NSString *clientId;
@@ -79,12 +86,15 @@ typedef NS_ENUM(NSUInteger, MSIDAutomationWPJRegistrationAPIMode)
7986
@property (nonatomic) BOOL corruptSessionKey;
8087
@property (nonatomic) BOOL useSafariUserAgent;
8188
@property (nonatomic) BOOL disableCertBasedAuth;
89+
@property (nonatomic) BOOL isMSAAccount;
8290

8391
@property (nonatomic) MSIDAutomationWPJRegistrationAPIMode registrationMode;
8492
@property (nonatomic) NSString *wpjRegistrationTenantId;
8593
@property (nonatomic) NSString *wpjRegistrationUpn;
8694
@property (nonatomic) BOOL operateOnPrimaryWPJ;
8795
@property (nonatomic) BOOL useMostSecureStorageForWpj;
96+
@property (nonatomic) BOOL isSecureEnclaveSupportedForWpj;
97+
@property (nonatomic) MSIDAutomationWPJSSOExtensionSecureStorage ssoExtensionSecureStorageEnabled;
8898
@property (nonatomic) BOOL shouldExpirePRT;
8999
@property (nonatomic) BOOL isSsoSeedingCompleted;
90100
@property (nonatomic) BOOL shouldOnlyDeleteSeedingPrt;

IdentityCore/tests/automation/shared/MSIDAutomationTestRequest.m

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json
5353
_brokerEnabled = [json[@"brokerEnabled"] boolValue];
5454
_clientCapabilities = json[@"client_capabilities"];
5555
_refreshToken = json[@"refresh_token"];
56+
_isMSAAccount = [json[@"isMSAAccount"] boolValue];
5657

5758
#if TARGET_OS_IPHONE
5859
NSString *webviewTypeString = json[@"webviewtype"];
@@ -102,6 +103,8 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json
102103
_wpjRegistrationUpn = json[@"wpj_registration_upn"];
103104
_operateOnPrimaryWPJ = [json[@"wpj_operate_on_primary_reg"] boolValue];
104105
_useMostSecureStorageForWpj = [json[@"use_most_secure_storage"] boolValue];
106+
_isSecureEnclaveSupportedForWpj = [json[@"wpj_secure_enclave_supported"] boolValue];
107+
_ssoExtensionSecureStorageEnabled = (MSIDAutomationWPJSSOExtensionSecureStorage)[json[@"wpj_sso_extension_secure_storage_enabled"] integerValue];
105108
_shouldExpirePRT = [json[@"should_expire_prt"] boolValue];
106109
_isSsoSeedingCompleted = [json[@"is_sso_seeding_completed"] boolValue];
107110
_shouldOnlyDeleteSeedingPrt = [json[@"should_only_delete_seeding_prt"] boolValue];
@@ -136,6 +139,7 @@ - (NSDictionary *)jsonDictionary
136139
json[@"corrupt_session_key"] = @(_corruptSessionKey);
137140
json[@"use_safari_ua"] = @(_useSafariUserAgent);
138141
json[@"disable_cert_based_auth"] = @(_disableCertBasedAuth);
142+
json[@"isMSAAccount"] = @(_isMSAAccount);
139143

140144
NSString *webviewType = nil;
141145

@@ -182,6 +186,8 @@ - (NSDictionary *)jsonDictionary
182186
json[@"wpj_registration_upn"] = _wpjRegistrationUpn;
183187
json[@"wpj_operate_on_primary_reg"] = @(_operateOnPrimaryWPJ);
184188
json[@"use_most_secure_storage"] = @(_useMostSecureStorageForWpj);
189+
json[@"wpj_secure_enclave_supported"] = @(_isSecureEnclaveSupportedForWpj);
190+
json[@"wpj_sso_extension_secure_storage_enabled"] = @(_ssoExtensionSecureStorageEnabled);
185191
json[@"should_expire_prt"] = @(_shouldExpirePRT);
186192
json[@"is_sso_seeding_completed"] = @(_isSsoSeedingCompleted);
187193
json[@"should_only_delete_seeding_prt"] = @(_shouldOnlyDeleteSeedingPrt);

IdentityCore/tests/automation/shared/MSIDAutomationUserInformation.h

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ NS_ASSUME_NONNULL_BEGIN
3939
@property (nonatomic) NSString *homeObjectId;
4040
@property (nonatomic) NSString *homeTenantId;
4141
@property (nonatomic) NSString *environment;
42+
@property (nonatomic) NSString *oneAuthAccountId;
4243

4344
@end
4445

IdentityCore/tests/automation/shared/MSIDAutomationUserInformation.m

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ - (NSDictionary *)jsonDictionary
3939
json[@"home_tenant_id"] = self.homeTenantId;
4040
json[@"environment"] = self.environment;
4141
json[@"legacyAccountId"] = self.legacyAccountId;
42+
json[@"oneAuthAccountId"] = self.oneAuthAccountId;
4243
return json;
4344
}
4445

@@ -59,6 +60,7 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json error:(__unused NSEr
5960
_homeTenantId = json[@"home_tenant_id"];
6061
_environment = json[@"environment"];
6162
_legacyAccountId = json[@"legacyAccountId"];
63+
_oneAuthAccountId = json[@"oneAuthAccountId"];
6264
}
6365

6466
return self;

IdentityCore/tests/automation/ui_app_lib/MSIDClearCookiesTestAction.m

+8
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)