Skip to content

Commit 8616f50

Browse files
committed
Merge branch 'dev' into antonioalwan/15_add_temp_tests_adj
* dev: Fix cookie clearing Minor automation tweaks Use older version of xcpretty Make upn hash case insensitive Resolve a crash when assign the 0 to expectedFulfillmentCount Update changelog Support web_page_uri. (#1440) Support web_page_uri. dummy change to trigger the pipeline Trigger the build with a dummy change Add new key for sub error description copy over tested pipeline yaml from different branch use azure pipeline integrated checkout system and update triggers add new yaml file for MSAL submodule check pipeline Add MSID_BROKER_SDK_BROKER_XPC_CAPABILITY const Add new requestType for telemetry service
2 parents 77b8b96 + 5ab5435 commit 8616f50

15 files changed

+170
-4
lines changed

IdentityCore/src/MSIDBrokerConstants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ extern NSString * _Nonnull const MSID_ADAL_BROKER_MESSAGE_VERSION;
7474
extern NSString * _Nonnull const MSID_MSAL_BROKER_MESSAGE_VERSION;
7575
extern NSString * _Nonnull const MSID_BROKER_SDK_CAPABILITIES_KEY;
7676
extern NSString * _Nonnull const MSID_BROKER_SDK_SSO_EXTENSION_CAPABILITY;
77+
extern NSString * _Nonnull const MSID_BROKER_SDK_BROKER_XPC_CAPABILITY;
7778
extern NSString * _Nonnull const MSID_BROKER_SSO_URL;
7879
extern NSString * _Nonnull const MSID_BROKER_ACCOUNT_IDENTIFIER;
7980
extern NSString * _Nonnull const MSID_BROKER_TYPES_OF_HEADER;

IdentityCore/src/MSIDBrokerConstants.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
NSString *const MSID_MSAL_BROKER_MESSAGE_VERSION = @"3";
7272
NSString *const MSID_BROKER_SDK_CAPABILITIES_KEY = @"sdk_broker_capabilities";
7373
NSString *const MSID_BROKER_SDK_SSO_EXTENSION_CAPABILITY = @"sso_extension";
74+
NSString *const MSID_BROKER_SDK_BROKER_XPC_CAPABILITY = @"broker_xpc";
7475
NSString *const MSID_BROKER_SSO_URL = @"sso_url";
7576
NSString *const MSID_BROKER_ACCOUNT_IDENTIFIER = @"account_identifier";
7677
NSString *const MSID_BROKER_TYPES_OF_HEADER = @"types_of_header";

IdentityCore/src/MSIDError.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
extern NSString * _Nonnull MSIDErrorDescriptionKey;
2727
extern NSString * _Nonnull MSIDOAuthErrorKey;
2828
extern NSString * _Nonnull MSIDOAuthSubErrorKey;
29+
extern NSString * _Nonnull MSIDOAuthSubErrorDescriptionKey;
2930
extern NSString * _Nonnull MSIDCorrelationIdKey;
3031
extern NSString * _Nonnull MSIDHTTPHeadersKey;
3132
extern NSString * _Nonnull MSIDHTTPResponseCodeKey;

IdentityCore/src/MSIDError.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
NSString *MSIDErrorDescriptionKey = @"MSIDErrorDescriptionKey";
2727
NSString *MSIDOAuthErrorKey = @"MSIDOAuthErrorKey";
2828
NSString *MSIDOAuthSubErrorKey = @"MSIDOAuthSubErrorKey";
29+
NSString *MSIDOAuthSubErrorDescriptionKey = @"MSIDOAuthSubErrorDescriptionKey";
2930
NSString *MSIDCorrelationIdKey = @"MSIDCorrelationIdKey";
3031
NSString *MSIDHTTPHeadersKey = @"MSIDHTTPHeadersKey";
3132
NSString *MSIDHTTPResponseCodeKey = @"MSIDHTTPResponseCodeKey";

IdentityCore/src/broker_operation/request/MSIDBaseBrokerOperationRequest.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
3333

3434
@property (nonatomic, class, readonly) NSString *operation;
3535
@property (nonatomic) NSUUID *correlationId;
36+
@property (nonatomic) NSInteger requestType;
3637

3738
- (nullable NSString *)logInfo;
3839

IdentityCore/src/broker_operation/request/token_request/MSIDBrokerOperationTokenRequest.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
4343
@property (nonatomic, nullable) MSIDClaimsRequest *claimsRequest;
4444
@property (nonatomic) NSDate *requestSentDate;
4545
@property (nonatomic) NSString *nonce;
46+
@property (nonatomic) NSString *webPageUri;
4647
@property (nonatomic, nullable) NSString *accountHomeTenantId;
4748
@property (nonatomic, nullable) NSString *clientSku;
4849
@property (nonatomic) BOOL skipValidateResultAccount;

IdentityCore/src/broker_operation/request/token_request/MSIDBrokerOperationTokenRequest.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ + (BOOL)fillRequest:(MSIDBrokerOperationTokenRequest *)request
6161
request.claimsRequest = parameters.claimsRequest;
6262
request.requestSentDate = requestSentDate;
6363
request.nonce = parameters.nonce;
64+
request.webPageUri = parameters.webPageUri;
6465
request.clientSku = parameters.clientSku;
6566
request.skipValidateResultAccount = parameters.skipValidateResultAccount;
6667
request.forceRefresh = parameters.forceRefresh;
@@ -79,6 +80,8 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json error:(NSError *__au
7980
_configuration = [[MSIDConfiguration alloc] initWithJSONDictionary:json error:error];
8081
if (!_configuration) return nil;
8182

83+
_webPageUri = [json msidStringObjectForKey:@"web_page_uri"];
84+
8285
_providerType = MSIDProviderTypeFromString([json msidStringObjectForKey:MSID_PROVIDER_TYPE_JSON_KEY]);
8386

8487
_oidcScope = [json msidStringObjectForKey:MSID_BROKER_EXTRA_OIDC_SCOPES_KEY];
@@ -135,6 +138,7 @@ - (NSDictionary *)jsonDictionary
135138
}
136139

137140
[json addEntriesFromDictionary:configurationJson];
141+
json[@"web_page_uri"] = self.webPageUri;
138142
json[MSID_PROVIDER_TYPE_JSON_KEY] = MSIDProviderTypeToString(self.providerType);
139143
json[MSID_BROKER_EXTRA_OIDC_SCOPES_KEY] = self.oidcScope;
140144
json[MSID_BROKER_EXTRA_QUERY_PARAM_KEY] = [self.extraQueryParameters msidWWWFormURLEncode];

IdentityCore/src/logger/MSIDMaskedUsernameLogParameter.m

Lines changed: 1 addition & 1 deletion
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/parameters/MSIDRequestParameters.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
@property (nonatomic) MSIDAuthority *providedAuthority;
4949
@property (nonatomic) MSIDAuthority *cloudAuthority;
5050
@property (nonatomic) NSString *redirectUri;
51+
@property (nonatomic) NSString *webPageUri;
5152
@property (nonatomic) NSString *clientId;
5253
@property (nonatomic) NSString *target;
5354
@property (nonatomic) NSString *oidcScope;

IdentityCore/tests/MSIDMaskedUsernameLogParameterTests.m

Lines changed: 11 additions & 0 deletions
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:@"username@domain.com"];
95+
MSIDMaskedUsernameLogParameter *logParameter1 = [[MSIDMaskedUsernameLogParameter alloc] initWithParameterValue:@"UserNamE@domAIN.com"];
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

0 commit comments

Comments
 (0)