Skip to content

Commit

Permalink
Merge branch 'dev' into danilo/base-e2e-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nilo-ms committed Jun 21, 2024
2 parents 081a803 + 006882e commit 1b8cff7
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.4.0]:
* Add platform sequence param. #2192
* Native auth can now store multiple access tokens related to different resources.

## [1.3.3]
* Update common core submodule.
* Automation improvements.
Expand Down
3 changes: 2 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Unless a later match takes precedence, these users will be requested
# for review whenever someone opens a pull request.
* @AzureAD/AppleIdentityTeam
# @AzureAD/AppleIdentityTeam and @AzureAD/MSAL-ObjC-CIAM will be the co-owners of the MSAL.project file
# @AzureAD/AppleIdentityTeam and @AzureAD/MSAL-ObjC-CIAM will be the co-owners of MSAL.project and CHANGELOG.md files
/MSAL/MSAL.xcodeproj/project.pbxproj @AzureAD/AppleIdentityTeam @AzureAD/MSAL-ObjC-CIAM
CHANGELOG.md @AzureAD/AppleIdentityTeam @AzureAD/MSAL-ObjC-CIAM
# @AzureAD/MSAL-ObjC-CIAM owns any files in the */native_auth
# directories, subdirectories and the module.modulemap file.
/MSAL/module.modulemap @AzureAD/MSAL-ObjC-CIAM
Expand Down
2 changes: 1 addition & 1 deletion MSAL.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MSAL"
s.version = "1.3.3"
s.version = "1.4.0"
s.summary = "Microsoft Authentication Library (MSAL) for iOS"
s.description = <<-DESC
The MSAL library for iOS gives your app the ability to begin using the Microsoft Cloud by supporting Microsoft Azure Active Directory and Microsoft Accounts in a converged experience using industry standard OAuth2 and OpenID Connect. The library also supports Microsoft Azure B2C for those using our hosted identity management service.
Expand Down
2 changes: 1 addition & 1 deletion MSAL/resources/ios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.3</string>
<string>1.4.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion MSAL/resources/mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.3</string>
<string>1.4.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
Expand Down
14 changes: 13 additions & 1 deletion MSAL/src/MSALPublicClientApplication.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
#import "MSIDAssymetricKeyLookupAttributes.h"
#import "MSIDRequestTelemetryConstants.h"
#import "MSALWipeCacheForAllAccountsConfig.h"
#import "NSString+MSIDTelemetryExtensions.h"
#import "MSIDVersion.h"

@interface MSALPublicClientApplication()
{
Expand Down Expand Up @@ -863,6 +865,10 @@ - (void)acquireTokenSilentWithParameters:(MSALSilentTokenParameters *)parameters
NSMutableDictionary *extraURLQueryParameters = [self.internalConfig.extraQueryParameters.extraURLQueryParameters mutableCopy];
[extraURLQueryParameters addEntriesFromDictionary:parameters.extraQueryParameters];
msidParams.extraURLQueryParameters = extraURLQueryParameters;

msidParams.platformSequence = [NSString msidUpdatePlatformSequenceParamWithSrcName:[MSIDVersion platformName]
srcVersion:[MSIDVersion sdkVersion]
sequence:nil];

msidParams.tokenExpirationBuffer = self.internalConfig.tokenExpirationBuffer;
msidParams.claimsRequest = parameters.claimsRequest.msidClaimsRequest;
Expand Down Expand Up @@ -1201,6 +1207,10 @@ - (void)acquireTokenWithParameters:(MSALInteractiveTokenParameters *)parameters
[extraURLQueryParameters addEntriesFromDictionary:parameters.extraQueryParameters];
msidParams.extraURLQueryParameters = extraURLQueryParameters;

msidParams.platformSequence = [NSString msidUpdatePlatformSequenceParamWithSrcName:[MSIDVersion platformName]
srcVersion:[MSIDVersion sdkVersion]
sequence:nil];

msidParams.tokenExpirationBuffer = self.internalConfig.tokenExpirationBuffer;
msidParams.extendedLifetimeEnabled = self.internalConfig.extendedLifetimeEnabled;
msidParams.clientCapabilities = self.internalConfig.clientApplicationCapabilities;
Expand Down Expand Up @@ -1454,7 +1464,9 @@ - (void)signoutWithAccount:(nonnull MSALAccount *)account
msidParams.validateAuthority = [self shouldValidateAuthorityForRequestAuthority:requestAuthority];
msidParams.keychainAccessGroup = self.internalConfig.cacheConfig.keychainSharingGroup;
msidParams.providedAuthority = requestAuthority;

msidParams.platformSequence = [NSString msidUpdatePlatformSequenceParamWithSrcName:[MSIDVersion platformName]
srcVersion:[MSIDVersion sdkVersion]
sequence:nil];
NSError *localError;
BOOL localRemovalResult = [self removeAccountImpl:account wipeAccount:signoutParameters.wipeAccount error:&localError];

Expand Down
4 changes: 2 additions & 2 deletions MSAL/src/MSAL_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
//------------------------------------------------------------------------------

#define MSAL_VER_HIGH 1
#define MSAL_VER_LOW 3
#define MSAL_VER_PATCH 3
#define MSAL_VER_LOW 4
#define MSAL_VER_PATCH 0

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
Expand Down
16 changes: 14 additions & 2 deletions MSAL/test/automation/tests/MSALBaseUITest.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,21 @@ - (void)closeAuthUIUsingWebViewType:(MSIDWebviewType)webViewType
// We take the second one and tap it
XCUIElement *secondButton = [elementQuery elementBoundByIndex:1];
[secondButton msidTap];
} else
}
else
{
[self.testApp.buttons[buttonTitle] msidTap];
if (webViewType == MSIDWebviewTypeSafariViewController)
{
// We take the first one and force tap it, for some reason tap doesn't work
XCUIElement *firstButton = [elementQuery elementBoundByIndex:0];

__auto_type coordinate = [firstButton coordinateWithNormalizedOffset:CGVectorMake(0, 0)];
[coordinate tap];
}
else
{
[self.testApp.buttons[buttonTitle] msidTap];
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ - (void)setUp

MSIDTestAutomationAccountConfigurationRequest *accountConfigurationRequest = [MSIDTestAutomationAccountConfigurationRequest new];
accountConfigurationRequest.federationProviderType = MSIDTestAccountFederationProviderTypeCIAM;
accountConfigurationRequest.additionalQueryParameters = @{@"signInAudience": @"azureadmyorg",@"PublicClient": @"No"};

[self loadTestAccount:accountConfigurationRequest];

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ let package = Package(
targets: ["MSAL"]),
],
targets: [
.binaryTarget(name: "MSAL", url: "https://github.com/AzureAD/microsoft-authentication-library-for-objc/releases/download/1.3.3/MSAL.zip", checksum: "4c4a52ed5bbc20875efed36707216ce0ca6b2b8846f2b88c16fc44f634093f2d")
.binaryTarget(name: "MSAL", url: "https://github.com/AzureAD/microsoft-authentication-library-for-objc/releases/download/1.4.0/MSAL.zip", checksum: "0bd52aa02ef94ec39ce7912fb66c5388b48cfd89c43ee3040b2d242505014fc8")
]
)

0 comments on commit 1b8cff7

Please sign in to comment.