diff --git a/MSAL/IdentityCore b/MSAL/IdentityCore index 5a86414eb7..f0c6ee3cf4 160000 --- a/MSAL/IdentityCore +++ b/MSAL/IdentityCore @@ -1 +1 @@ -Subproject commit 5a86414eb7c0e6345f9bee3a1e50eb5eb942daf9 +Subproject commit f0c6ee3cf419f6afcd41ffcbda78303b7ffcc4f5 diff --git a/MSAL/MSAL.xcodeproj/project.pbxproj b/MSAL/MSAL.xcodeproj/project.pbxproj index b11dcb919a..4e2aae04f6 100644 --- a/MSAL/MSAL.xcodeproj/project.pbxproj +++ b/MSAL/MSAL.xcodeproj/project.pbxproj @@ -9009,6 +9009,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 1.2; }; name = Debug; }; @@ -9024,6 +9025,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 1.2; }; name = Release; }; diff --git a/MSAL/test/integration/native_auth/end_to_end/credentials/MSALNativeAuthUserAccountEndToEndTests.swift b/MSAL/test/integration/native_auth/end_to_end/credentials/MSALNativeAuthUserAccountEndToEndTests.swift index 4de154e638..a8df6da563 100644 --- a/MSAL/test/integration/native_auth/end_to_end/credentials/MSALNativeAuthUserAccountEndToEndTests.swift +++ b/MSAL/test/integration/native_auth/end_to_end/credentials/MSALNativeAuthUserAccountEndToEndTests.swift @@ -62,8 +62,8 @@ final class MSALNativeAuthUserAccountEndToEndTests: MSALNativeAuthEndToEndPasswo XCTAssertEqual(signInDelegateSpy.result?.account.username, username) } - // Sign in with username and password to get access token and force refresh with existing scopes - func test_signInAndForceRefreshWithExistingScopesSucceeds() async throws { + // Sign in with username and password to get access token and force refresh with access token not linked to client Id + func test_signInAndForceRefreshWithNotConfiguredScopes() async throws { #if os(macOS) throw XCTSkip("Bundle id for macOS is not added to the client id, test is not needed on both iOS and macOS") #endif @@ -83,38 +83,6 @@ final class MSALNativeAuthUserAccountEndToEndTests: MSALNativeAuthEndToEndPasswo XCTAssertNotNil(signInDelegateSpy.result?.idToken) XCTAssertEqual(signInDelegateSpy.result?.account.username, username) - let previousIdToken = signInDelegateSpy.result?.idToken - let refreshAccessTokenExpectation = expectation(description: "refreshing access token") - let credentialsDelegateSpy = CredentialsDelegateSpy(expectation: refreshAccessTokenExpectation) - - signInDelegateSpy.result?.getAccessToken(scopes: ["User.Read"], forceRefresh: true, delegate: credentialsDelegateSpy) - - await fulfillment(of: [refreshAccessTokenExpectation]) - - XCTAssertTrue(credentialsDelegateSpy.onAccessTokenRetrieveCompletedCalled) - XCTAssertNotNil(credentialsDelegateSpy.result?.accessToken) - XCTAssertNotEqual(previousIdToken, signInDelegateSpy.result?.idToken) - XCTAssertEqual(signInDelegateSpy.result?.account.username, username) - } - - // Sign in with username and password to get access token and force refresh with different scopes - func test_signInAndForceRefreshWithDifferentScopesFails() async throws { - guard let sut = initialisePublicClientApplication(), let username = retrieveUsernameForSignInUsernameAndPassword(), let password = await retrievePasswordForSignInUsername() else { - XCTFail("Missing information") - return - } - - let signInExpectation = expectation(description: "signing in") - let signInDelegateSpy = SignInPasswordStartDelegateSpy(expectation: signInExpectation) - - sut.signIn(username: username, password: password, correlationId: correlationId, delegate: signInDelegateSpy) - - await fulfillment(of: [signInExpectation]) - - XCTAssertTrue(signInDelegateSpy.onSignInCompletedCalled) - XCTAssertNotNil(signInDelegateSpy.result?.idToken) - XCTAssertEqual(signInDelegateSpy.result?.account.username, username) - let refreshAccessTokenExpectation = expectation(description: "refreshing access token") let credentialsDelegateSpy = CredentialsDelegateSpy(expectation: refreshAccessTokenExpectation)