Skip to content

Commit 96e9735

Browse files
authored
Bump to MSAL 4.64.1 (#3017)
* Bump MSAL to 4.64.1 * 2
1 parent 711234c commit 96e9735

File tree

5 files changed

+17
-80
lines changed

5 files changed

+17
-80
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,4 +353,5 @@ MigrationBackup/
353353

354354
# Playwright e2e testing trace files
355355
/tests/E2E Tests/PlaywrightTraces
356-
/tests/IntegrationTests/PlaywrightTraces
356+
/tests/IntegrationTests/PlaywrightTraces
357+
/.SharedData

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
<PropertyGroup Label="Common dependency versions">
8080
<MicrosoftIdentityModelVersion Condition="'$(MicrosoftIdentityModelVersion)' == ''">8.0.2</MicrosoftIdentityModelVersion>
81-
<MicrosoftIdentityClientVersion Condition="'$(MicrosoftIdentityClientVersion)' == ''">4.61.3</MicrosoftIdentityClientVersion>
81+
<MicrosoftIdentityClientVersion Condition="'$(MicrosoftIdentityClientVersion)' == ''">4.64.1</MicrosoftIdentityClientVersion>
8282
<FxCopAnalyzersVersion>3.3.0</FxCopAnalyzersVersion>
8383
<SystemTextEncodingsWebVersion>4.7.2</SystemTextEncodingsWebVersion>
8484
<AzureSecurityKeyVaultSecretsVersion>4.6.0</AzureSecurityKeyVaultSecretsVersion>

tests/Microsoft.Identity.Web.Test/CacheExtensionsTests.cs

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,42 +33,40 @@ public void InMemoryCacheExtensionsTests()
3333
public async Task CacheExtensions_CcaAlreadyExists_TestsAsync()
3434
{
3535
AuthenticationResult result;
36-
TestTelemetryClient testTelemetryClient = new TestTelemetryClient(TestConstants.ClientId);
3736
// new InMemory serializer and new cca
38-
result = await CreateAppAndGetTokenAsync(CacheType.InMemory, testTelemetryClient).ConfigureAwait(false);
37+
result = await CreateAppAndGetTokenAsync(CacheType.InMemory).ConfigureAwait(false);
3938
Assert.Equal(TokenSource.IdentityProvider, result.AuthenticationResultMetadata.TokenSource);
40-
AssertCacheTelemetry(testTelemetryClient, CacheLevel.None);
39+
AssertCacheTelemetry(result, CacheLevel.None);
4140

42-
result = await CreateAppAndGetTokenAsync(CacheType.InMemory, testTelemetryClient, addTokenMock: false).ConfigureAwait(false);
41+
result = await CreateAppAndGetTokenAsync(CacheType.InMemory, addTokenMock: false).ConfigureAwait(false);
4342
Assert.Equal(TokenSource.Cache, result.AuthenticationResultMetadata.TokenSource);
44-
AssertCacheTelemetry(testTelemetryClient, CacheLevel.L1Cache);
43+
AssertCacheTelemetry(result, CacheLevel.L1Cache);
4544

4645
//Resetting token caches due to potential collision with other tests
4746
TokenCacheExtensions.s_serviceProviderFromAction.Clear();
4847

4948
// new DistributedInMemory and same cca
50-
result = await CreateAppAndGetTokenAsync(CacheType.DistributedInMemory, testTelemetryClient).ConfigureAwait(false);
49+
result = await CreateAppAndGetTokenAsync(CacheType.DistributedInMemory).ConfigureAwait(false);
5150
Assert.Equal(TokenSource.IdentityProvider, result.AuthenticationResultMetadata.TokenSource);
52-
AssertCacheTelemetry(testTelemetryClient, CacheLevel.None);
51+
AssertCacheTelemetry(result, CacheLevel.None);
5352

54-
result = await CreateAppAndGetTokenAsync(CacheType.DistributedInMemory, testTelemetryClient, addTokenMock: false).ConfigureAwait(false);
53+
result = await CreateAppAndGetTokenAsync(CacheType.DistributedInMemory, addTokenMock: false).ConfigureAwait(false);
5554
Assert.Equal(TokenSource.Cache, result.AuthenticationResultMetadata.TokenSource);
56-
AssertCacheTelemetry(testTelemetryClient, CacheLevel.L1Cache);
55+
AssertCacheTelemetry(result, CacheLevel.L1Cache);
5756
}
5857

5958
[Fact]
6059
public async Task CacheExtensions_CcaAlreadyExistsL2_TestsAsync()
6160
{
6261
AuthenticationResult result;
63-
TestTelemetryClient testTelemetryClient = new TestTelemetryClient(TestConstants.ClientId);
6462
// new DistributedInMemory serializer with L1 cache disabled
65-
result = await CreateAppAndGetTokenAsync(CacheType.DistributedInMemory, testTelemetryClient, disableL1Cache: true).ConfigureAwait(false);
63+
result = await CreateAppAndGetTokenAsync(CacheType.DistributedInMemory, disableL1Cache: true).ConfigureAwait(false);
6664
Assert.Equal(TokenSource.IdentityProvider, result.AuthenticationResultMetadata.TokenSource);
67-
AssertCacheTelemetry(testTelemetryClient, CacheLevel.None);
65+
AssertCacheTelemetry(result, CacheLevel.None);
6866

69-
result = await CreateAppAndGetTokenAsync(CacheType.DistributedInMemory, testTelemetryClient, addTokenMock: false, disableL1Cache: true).ConfigureAwait(false);
67+
result = await CreateAppAndGetTokenAsync(CacheType.DistributedInMemory, addTokenMock: false, disableL1Cache: true).ConfigureAwait(false);
7068
Assert.Equal(TokenSource.Cache, result.AuthenticationResultMetadata.TokenSource);
71-
AssertCacheTelemetry(testTelemetryClient, CacheLevel.L2Cache);
69+
AssertCacheTelemetry(result, CacheLevel.L2Cache);
7270
}
7371

7472
[Fact]
@@ -200,7 +198,6 @@ private enum CacheType
200198

201199
private static async Task<AuthenticationResult> CreateAppAndGetTokenAsync(
202200
CacheType cacheType,
203-
ITelemetryClient telemetryClient,
204201
bool addTokenMock = true,
205202
bool disableL1Cache = false)
206203
{
@@ -221,7 +218,6 @@ private static async Task<AuthenticationResult> CreateAppAndGetTokenAsync(
221218
.WithAuthority(TestConstants.AuthorityCommonTenant)
222219
.WithHttpClientFactory(mockHttp)
223220
.WithClientSecret(TestConstants.ClientSecret)
224-
.WithTelemetryClient(telemetryClient)
225221
.Build();
226222

227223
switch (cacheType)
@@ -255,10 +251,9 @@ private static async Task<AuthenticationResult> CreateAppAndGetTokenAsync(
255251
return result;
256252
}
257253

258-
private void AssertCacheTelemetry(TestTelemetryClient testTelemetryClient, CacheLevel cacheLevel)
254+
private void AssertCacheTelemetry(AuthenticationResult result, CacheLevel expectedCacheLevel)
259255
{
260-
TelemetryEventDetails eventDetails = testTelemetryClient.TestTelemetryEventDetails;
261-
Assert.Equal(Convert.ToInt64(cacheLevel, new CultureInfo("en-US")), eventDetails.Properties["CacheLevel"]);
256+
Assert.Equal(result.AuthenticationResultMetadata.CacheLevel, expectedCacheLevel);
262257
}
263258

264259
private IConfidentialClientApplication CreateCca() =>

tests/Microsoft.Identity.Web.Test/Microsoft.Identity.Web.Test.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
<Compile Include="Certificates\DefaultCertificateLoaderTests.cs" />
4646
<Compile Include="CacheExtensionsTests.cs" />
4747
<Compile Include="CacheEncryptionTests.cs" />
48-
<Compile Include="TestTelemetryClient.cs" />
4948
<Compile Include="TestDistributedCache.cs" />
5049
</ItemGroup>
5150

tests/Microsoft.Identity.Web.Test/TestTelemetryClient.cs

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)