Skip to content

Commit

Permalink
Merge pull request #1441 from AzureAD/release/1.7.43
Browse files Browse the repository at this point in the history
Release Common Core 1.7.43
  • Loading branch information
Veena11 authored Nov 19, 2024
2 parents b4fd324 + e9e97ed commit 9eadce5
Show file tree
Hide file tree
Showing 16 changed files with 141 additions and 11 deletions.
1 change: 1 addition & 0 deletions IdentityCore/src/MSIDBrokerConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ extern NSString * _Nonnull const MSID_ADAL_BROKER_MESSAGE_VERSION;
extern NSString * _Nonnull const MSID_MSAL_BROKER_MESSAGE_VERSION;
extern NSString * _Nonnull const MSID_BROKER_SDK_CAPABILITIES_KEY;
extern NSString * _Nonnull const MSID_BROKER_SDK_SSO_EXTENSION_CAPABILITY;
extern NSString * _Nonnull const MSID_BROKER_SDK_BROKER_XPC_CAPABILITY;
extern NSString * _Nonnull const MSID_BROKER_SSO_URL;
extern NSString * _Nonnull const MSID_BROKER_ACCOUNT_IDENTIFIER;
extern NSString * _Nonnull const MSID_BROKER_TYPES_OF_HEADER;
Expand Down
1 change: 1 addition & 0 deletions IdentityCore/src/MSIDBrokerConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
NSString *const MSID_MSAL_BROKER_MESSAGE_VERSION = @"3";
NSString *const MSID_BROKER_SDK_CAPABILITIES_KEY = @"sdk_broker_capabilities";
NSString *const MSID_BROKER_SDK_SSO_EXTENSION_CAPABILITY = @"sso_extension";
NSString *const MSID_BROKER_SDK_BROKER_XPC_CAPABILITY = @"broker_xpc";
NSString *const MSID_BROKER_SSO_URL = @"sso_url";
NSString *const MSID_BROKER_ACCOUNT_IDENTIFIER = @"account_identifier";
NSString *const MSID_BROKER_TYPES_OF_HEADER = @"types_of_header";
Expand Down
1 change: 1 addition & 0 deletions IdentityCore/src/MSIDError.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
extern NSString * _Nonnull MSIDErrorDescriptionKey;
extern NSString * _Nonnull MSIDOAuthErrorKey;
extern NSString * _Nonnull MSIDOAuthSubErrorKey;
extern NSString * _Nonnull MSIDOAuthSubErrorDescriptionKey;
extern NSString * _Nonnull MSIDCorrelationIdKey;
extern NSString * _Nonnull MSIDHTTPHeadersKey;
extern NSString * _Nonnull MSIDHTTPResponseCodeKey;
Expand Down
1 change: 1 addition & 0 deletions IdentityCore/src/MSIDError.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
NSString *MSIDErrorDescriptionKey = @"MSIDErrorDescriptionKey";
NSString *MSIDOAuthErrorKey = @"MSIDOAuthErrorKey";
NSString *MSIDOAuthSubErrorKey = @"MSIDOAuthSubErrorKey";
NSString *MSIDOAuthSubErrorDescriptionKey = @"MSIDOAuthSubErrorDescriptionKey";
NSString *MSIDCorrelationIdKey = @"MSIDCorrelationIdKey";
NSString *MSIDHTTPHeadersKey = @"MSIDHTTPHeadersKey";
NSString *MSIDHTTPResponseCodeKey = @"MSIDHTTPResponseCodeKey";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ NS_ASSUME_NONNULL_BEGIN

@property (nonatomic, class, readonly) NSString *operation;
@property (nonatomic) NSUUID *correlationId;
@property (nonatomic) NSInteger requestType;

- (nullable NSString *)logInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, nullable) MSIDClaimsRequest *claimsRequest;
@property (nonatomic) NSDate *requestSentDate;
@property (nonatomic) NSString *nonce;
@property (nonatomic) NSString *webPageUri;
@property (nonatomic, nullable) NSString *accountHomeTenantId;
@property (nonatomic, nullable) NSString *clientSku;
@property (nonatomic) BOOL skipValidateResultAccount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ + (BOOL)fillRequest:(MSIDBrokerOperationTokenRequest *)request
request.claimsRequest = parameters.claimsRequest;
request.requestSentDate = requestSentDate;
request.nonce = parameters.nonce;
request.webPageUri = parameters.webPageUri;
request.clientSku = parameters.clientSku;
request.skipValidateResultAccount = parameters.skipValidateResultAccount;
request.forceRefresh = parameters.forceRefresh;
Expand All @@ -79,6 +80,8 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json error:(NSError *__au
_configuration = [[MSIDConfiguration alloc] initWithJSONDictionary:json error:error];
if (!_configuration) return nil;

_webPageUri = [json msidStringObjectForKey:@"web_page_uri"];

_providerType = MSIDProviderTypeFromString([json msidStringObjectForKey:MSID_PROVIDER_TYPE_JSON_KEY]);

_oidcScope = [json msidStringObjectForKey:MSID_BROKER_EXTRA_OIDC_SCOPES_KEY];
Expand Down Expand Up @@ -135,6 +138,7 @@ - (NSDictionary *)jsonDictionary
}

[json addEntriesFromDictionary:configurationJson];
json[@"web_page_uri"] = self.webPageUri;
json[MSID_PROVIDER_TYPE_JSON_KEY] = MSIDProviderTypeToString(self.providerType);
json[MSID_BROKER_EXTRA_OIDC_SCOPES_KEY] = self.oidcScope;
json[MSID_BROKER_EXTRA_QUERY_PARAM_KEY] = [self.extraQueryParameters msidWWWFormURLEncode];
Expand Down
1 change: 1 addition & 0 deletions IdentityCore/src/parameters/MSIDRequestParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
@property (nonatomic) MSIDAuthority *providedAuthority;
@property (nonatomic) MSIDAuthority *cloudAuthority;
@property (nonatomic) NSString *redirectUri;
@property (nonatomic) NSString *webPageUri;
@property (nonatomic) NSString *clientId;
@property (nonatomic) NSString *target;
@property (nonatomic) NSString *oidcScope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ - (void)executeRequestWithCompletion:(nonnull MSIDGetAccountsRequestCompletionBl
self.authorizationController.delegate = self.extensionDelegate;

self.requestSentDate = [NSDate date];
[self.authorizationController msidPerformRequests];


self.requestCompletionBlock = completionBlock;
[self.authorizationController msidPerformRequests];
}

#pragma mark - AuthenticationServices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ - (void)executeRequestWithCompletion:(nonnull MSIDGetDeviceInfoRequestCompletion
self.authorizationController = [self controllerWithRequest:ssoRequest];
self.authorizationController.delegate = self.extensionDelegate;
self.requestSentDate = [NSDate date];
[self.authorizationController msidPerformRequests];


self.requestCompletionBlock = completionBlock;
[self.authorizationController msidPerformRequests];
}

#pragma mark - AuthenticationServices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ - (void)executeRequestWithCompletion:(MSIDInteractiveRequestCompletionBlock)comp
self.authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[ssoRequest]];
self.authorizationController.delegate = self.extensionDelegate;
self.authorizationController.presentationContextProvider = self;
[self.authorizationController msidPerformRequests];

self.requestCompletionBlock = completionBlock;

[self.authorizationController msidPerformRequests];
}];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,8 @@ - (void)executeRequestWithCompletion:(nonnull MSIDSignoutRequestCompletionBlock)
self.authorizationController = [self controllerWithRequest:ssoRequest];
self.authorizationController.delegate = self.extensionDelegate;
self.requestSentDate = [NSDate date];
[self.authorizationController msidPerformRequests];

self.requestCompletionBlock = completionBlock;
[self.authorizationController msidPerformRequests];
}

#pragma mark - AuthenticationServices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,8 @@ - (void)executeRequestImplWithCompletionBlock:(MSIDRequestCompletionBlock _Nonnu
self.authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[ssoRequest]];
self.authorizationController.delegate = self.extensionDelegate;

[self.authorizationController msidPerformRequests];

self.requestCompletionBlock = completionBlock;
[self.authorizationController msidPerformRequests];
}

- (id<MSIDCacheAccessor>)tokenCache
Expand Down
5 changes: 4 additions & 1 deletion IdentityCore/tests/automation/ui_tests_lib/MSIDBaseUITest.m
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@ - (NSArray *)loadTestAccountRequest:(MSIDAutomationBaseApiRequest *)accountReque
XCTAssertTrue(results.count >= 1);

XCTestExpectation *passwordLoadExpecation = [self expectationWithDescription:@"Get password"];
passwordLoadExpecation.expectedFulfillmentCount = results.count;
if (results && results.count > 0)
{
passwordLoadExpecation.expectedFulfillmentCount = results.count;
}

for (MSIDTestAutomationAccount *account in results)
{
Expand Down
112 changes: 112 additions & 0 deletions azure_pipelines/msal_submodule_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Pipeline will be triggered for PR & any updates on the PR on all branches
pr:
branches:
include:
- '*'

# Trigger CI for only main/release branches
trigger:
branches:
include:
- main
- release/*

resources:
repositories:
- repository: microsoft-authentication-library-for-objc
type: github
endpoint: 'MSAL ObjC Service Connection'
name: AzureAD/microsoft-authentication-library-for-objc

# Define parallel jobs that run build script for specified targets
jobs:
- job: 'Validate_Pull_Request'
strategy:
maxParallel: 3
matrix:
IOS_FRAMEWORK:
target: "iosFramework iosTestApp sampleIosApp sampleIosAppSwift"
MAC_FRAMEWORK:
target: "macFramework"
VISION_FRAMEWORK:
target: "visionOSFramework"
displayName: Validate Pull Request
pool:
vmImage: 'macOS-14'
timeOutInMinutes: 30

steps:
- script: |
/bin/bash -c "sudo xcode-select -s /Applications/Xcode_15.4.app"
displayName: 'Switch to use Xcode 15.4'
- task: CmdLine@2
displayName: Installing dependencies
inputs:
script: |
gem install xcpretty slather bundler -N
failOnStderr: true

# The following is needed to install the visionOS SDK on macos-14 vm image which
# doesn't have visionOS installed by default.
# TODO: Remove when macos-14-arm64 is supported on ADO.
- task: Bash@3
displayName: download visionOS SDK
inputs:
targetType: 'inline'
script: |
echo $(target)
if [ $(target) == 'visionOSFramework' ]; then
echo "Downloading simulator for visionOS"
sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
xcodebuild -downloadPlatform visionOS
else
echo "Not visionOS job, no download needed"
fi
failOnStderr: false

- checkout: microsoft-authentication-library-for-objc
displayName: 'Checkout MSAL'
clean: true
submodules: true
fetchTags: true
persistCredentials: true

- checkout: self
clean: true
submodules: false
fetchDepth: 1
path: 's/microsoft-authentication-library-for-objc/MSAL/IdentityCore'
persistCredentials: false

- task: Bash@3
displayName: Run Build script & check for Errors
inputs:
targetType: 'inline'
script: |
cd $(Agent.BuildDirectory)/s/microsoft-authentication-library-for-objc
{ output=$(./build.py --target $(target) 2>&1 1>&3-) ;} 3>&1
final_status=$(<./build/status.txt)
echo "FINAL STATUS = ${final_status}"
echo "POSSIBLE ERRORS: ${output}"
if [ $final_status != "0" ]; then
echo "Build & Testing Failed! \n ${output}" >&2
fi
failOnStderr: true
- task: Bash@3
condition: always()
displayName: Cleanup
inputs:
targetType: 'inline'
script: |
rm -rf $(Agent.BuildDirectory)/s/build/status.txt
- task: PublishTestResults@2
condition: always()
displayName: Publish Test Report
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '$(Agent.BuildDirectory)/s/build/reports/*'
failTaskOnFailedTests: true
testRunTitle: 'Test Run - $(target)'
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 1.7.43
* Support web_page_uri #1440
* Save error received from ESTS, and return it to the client on silent broker calls (#1438)
* XPC CommonCore Minor change to support broker XPC changes (#1436)
* Assign completion block before perform request (#1434)

Version 1.7.42
* Support extra query parameters on signout (#1243)
* Wrap ASAuthorizationProviderExtensionAuthorizationRequest methods (#1427)
Expand Down

0 comments on commit 9eadce5

Please sign in to comment.