Skip to content

Commit 9eadce5

Browse files
authored
Merge pull request #1441 from AzureAD/release/1.7.43
Release Common Core 1.7.43
2 parents b4fd324 + e9e97ed commit 9eadce5

16 files changed

+141
-11
lines changed

IdentityCore/src/MSIDBrokerConstants.h

+1
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

+1
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

+1
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

+1
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

+1
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

+1
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

+4
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/parameters/MSIDRequestParameters.h

+1
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/src/requests/broker/MSIDSSOExtensionGetAccountsRequest.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ - (void)executeRequestWithCompletion:(nonnull MSIDGetAccountsRequestCompletionBl
148148
self.authorizationController.delegate = self.extensionDelegate;
149149

150150
self.requestSentDate = [NSDate date];
151-
[self.authorizationController msidPerformRequests];
152-
151+
153152
self.requestCompletionBlock = completionBlock;
153+
[self.authorizationController msidPerformRequests];
154154
}
155155

156156
#pragma mark - AuthenticationServices

IdentityCore/src/requests/broker/MSIDSSOExtensionGetDeviceInfoRequest.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ - (void)executeRequestWithCompletion:(nonnull MSIDGetDeviceInfoRequestCompletion
131131
self.authorizationController = [self controllerWithRequest:ssoRequest];
132132
self.authorizationController.delegate = self.extensionDelegate;
133133
self.requestSentDate = [NSDate date];
134-
[self.authorizationController msidPerformRequests];
135-
134+
136135
self.requestCompletionBlock = completionBlock;
136+
[self.authorizationController msidPerformRequests];
137137
}
138138

139139
#pragma mark - AuthenticationServices

IdentityCore/src/requests/broker/MSIDSSOExtensionInteractiveTokenRequest.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ - (void)executeRequestWithCompletion:(MSIDInteractiveRequestCompletionBlock)comp
176176
self.authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[ssoRequest]];
177177
self.authorizationController.delegate = self.extensionDelegate;
178178
self.authorizationController.presentationContextProvider = self;
179-
[self.authorizationController msidPerformRequests];
180-
181179
self.requestCompletionBlock = completionBlock;
180+
181+
[self.authorizationController msidPerformRequests];
182182
}];
183183
}
184184

IdentityCore/src/requests/broker/MSIDSSOExtensionSignoutRequest.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,8 @@ - (void)executeRequestWithCompletion:(nonnull MSIDSignoutRequestCompletionBlock)
170170
self.authorizationController = [self controllerWithRequest:ssoRequest];
171171
self.authorizationController.delegate = self.extensionDelegate;
172172
self.requestSentDate = [NSDate date];
173-
[self.authorizationController msidPerformRequests];
174-
175173
self.requestCompletionBlock = completionBlock;
174+
[self.authorizationController msidPerformRequests];
176175
}
177176

178177
#pragma mark - AuthenticationServices

IdentityCore/src/requests/broker/MSIDSSOExtensionSilentTokenRequest.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,8 @@ - (void)executeRequestImplWithCompletionBlock:(MSIDRequestCompletionBlock _Nonnu
223223
self.authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[ssoRequest]];
224224
self.authorizationController.delegate = self.extensionDelegate;
225225

226-
[self.authorizationController msidPerformRequests];
227-
228226
self.requestCompletionBlock = completionBlock;
227+
[self.authorizationController msidPerformRequests];
229228
}
230229

231230
- (id<MSIDCacheAccessor>)tokenCache

IdentityCore/tests/automation/ui_tests_lib/MSIDBaseUITest.m

+4-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ - (NSArray *)loadTestAccountRequest:(MSIDAutomationBaseApiRequest *)accountReque
436436
XCTAssertTrue(results.count >= 1);
437437

438438
XCTestExpectation *passwordLoadExpecation = [self expectationWithDescription:@"Get password"];
439-
passwordLoadExpecation.expectedFulfillmentCount = results.count;
439+
if (results && results.count > 0)
440+
{
441+
passwordLoadExpecation.expectedFulfillmentCount = results.count;
442+
}
440443

441444
for (MSIDTestAutomationAccount *account in results)
442445
{
+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Pipeline will be triggered for PR & any updates on the PR on all branches
2+
pr:
3+
branches:
4+
include:
5+
- '*'
6+
7+
# Trigger CI for only main/release branches
8+
trigger:
9+
branches:
10+
include:
11+
- main
12+
- release/*
13+
14+
resources:
15+
repositories:
16+
- repository: microsoft-authentication-library-for-objc
17+
type: github
18+
endpoint: 'MSAL ObjC Service Connection'
19+
name: AzureAD/microsoft-authentication-library-for-objc
20+
21+
# Define parallel jobs that run build script for specified targets
22+
jobs:
23+
- job: 'Validate_Pull_Request'
24+
strategy:
25+
maxParallel: 3
26+
matrix:
27+
IOS_FRAMEWORK:
28+
target: "iosFramework iosTestApp sampleIosApp sampleIosAppSwift"
29+
MAC_FRAMEWORK:
30+
target: "macFramework"
31+
VISION_FRAMEWORK:
32+
target: "visionOSFramework"
33+
displayName: Validate Pull Request
34+
pool:
35+
vmImage: 'macOS-14'
36+
timeOutInMinutes: 30
37+
38+
steps:
39+
- script: |
40+
/bin/bash -c "sudo xcode-select -s /Applications/Xcode_15.4.app"
41+
displayName: 'Switch to use Xcode 15.4'
42+
- task: CmdLine@2
43+
displayName: Installing dependencies
44+
inputs:
45+
script: |
46+
gem install xcpretty slather bundler -N
47+
failOnStderr: true
48+
49+
# The following is needed to install the visionOS SDK on macos-14 vm image which
50+
# doesn't have visionOS installed by default.
51+
# TODO: Remove when macos-14-arm64 is supported on ADO.
52+
- task: Bash@3
53+
displayName: download visionOS SDK
54+
inputs:
55+
targetType: 'inline'
56+
script: |
57+
echo $(target)
58+
if [ $(target) == 'visionOSFramework' ]; then
59+
echo "Downloading simulator for visionOS"
60+
sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
61+
defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
62+
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
63+
xcodebuild -downloadPlatform visionOS
64+
else
65+
echo "Not visionOS job, no download needed"
66+
fi
67+
failOnStderr: false
68+
69+
- checkout: microsoft-authentication-library-for-objc
70+
displayName: 'Checkout MSAL'
71+
clean: true
72+
submodules: true
73+
fetchTags: true
74+
persistCredentials: true
75+
76+
- checkout: self
77+
clean: true
78+
submodules: false
79+
fetchDepth: 1
80+
path: 's/microsoft-authentication-library-for-objc/MSAL/IdentityCore'
81+
persistCredentials: false
82+
83+
- task: Bash@3
84+
displayName: Run Build script & check for Errors
85+
inputs:
86+
targetType: 'inline'
87+
script: |
88+
cd $(Agent.BuildDirectory)/s/microsoft-authentication-library-for-objc
89+
{ output=$(./build.py --target $(target) 2>&1 1>&3-) ;} 3>&1
90+
final_status=$(<./build/status.txt)
91+
echo "FINAL STATUS = ${final_status}"
92+
echo "POSSIBLE ERRORS: ${output}"
93+
94+
if [ $final_status != "0" ]; then
95+
echo "Build & Testing Failed! \n ${output}" >&2
96+
fi
97+
failOnStderr: true
98+
- task: Bash@3
99+
condition: always()
100+
displayName: Cleanup
101+
inputs:
102+
targetType: 'inline'
103+
script: |
104+
rm -rf $(Agent.BuildDirectory)/s/build/status.txt
105+
- task: PublishTestResults@2
106+
condition: always()
107+
displayName: Publish Test Report
108+
inputs:
109+
testResultsFormat: 'JUnit'
110+
testResultsFiles: '$(Agent.BuildDirectory)/s/build/reports/*'
111+
failTaskOnFailedTests: true
112+
testRunTitle: 'Test Run - $(target)'

changelog.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 1.7.43
2+
* Support web_page_uri #1440
3+
* Save error received from ESTS, and return it to the client on silent broker calls (#1438)
4+
* XPC CommonCore Minor change to support broker XPC changes (#1436)
5+
* Assign completion block before perform request (#1434)
6+
17
Version 1.7.42
28
* Support extra query parameters on signout (#1243)
39
* Wrap ASAuthorizationProviderExtensionAuthorizationRequest methods (#1427)

0 commit comments

Comments
 (0)