Skip to content

Commit f8cdb58

Browse files
Update Microsoft.IdentityModel to 7.0.0-preview5 (#50538)
* Update Microsoft.IdentityModel to 7.0.0-preview * Update test to account for bug fix in AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#2283. * Update dependencies from https://github.com/dotnet/source-build-externals build 20230906.1 Microsoft.SourceBuild.Intermediate.source-build-externals From Version 8.0.0-alpha.1.23455.1 -> To Version 8.0.0-alpha.1.23456.1 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 415e7f7 commit f8cdb58

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@
189189
<Uri>https://github.com/dotnet/runtime</Uri>
190190
<Sha>1222f14d02818cfab597fa2a17c8664fe6cb39be</Sha>
191191
</Dependency>
192-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23455.1">
192+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23456.1">
193193
<Uri>https://github.com/dotnet/source-build-externals</Uri>
194-
<Sha>80d1c9575b8e2a3c4244fe042e3ee2b662b22ebe</Sha>
194+
<Sha>1b64d3c0fad8af67da8f42927ce7306730224c15</Sha>
195195
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
196196
</Dependency>
197197
<Dependency Name="Microsoft.SourceBuild.Intermediate.symreader" Version="2.0.0-beta-23228-03">

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
1212
<PreReleaseVersionIteration>2</PreReleaseVersionIteration>
1313
<ValidateBaseline>true</ValidateBaseline>
14-
<IdentityModelVersion>7.0.0-preview4</IdentityModelVersion>
14+
<IdentityModelVersion>7.0.0-preview5</IdentityModelVersion>
1515
<!--
1616
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
1717
-->
@@ -162,7 +162,7 @@
162162
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23451.1</MicrosoftDotNetBuildTasksTemplatingVersion>
163163
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.23451.1</MicrosoftDotNetRemoteExecutorVersion>
164164
<!-- Packages from dotnet/source-build-externals -->
165-
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23455.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
165+
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23456.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
166166
<!-- Packages from dotnet/source-build-reference-packages -->
167167
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>8.0.0-alpha.1.23455.3</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>
168168
<!-- Packages from dotnet/symreader -->

src/Security/Authentication/test/JwtBearerTests.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Globalization;
45
using System.IdentityModel.Tokens.Jwt;
56
using System.Net;
67
using System.Net.Http;
@@ -958,15 +959,15 @@ public async Task ExpirationAndIssuedSetOnAuthenticateResult()
958959
}
959960

960961
[Fact]
961-
public async Task ExpirationAndIssuedNullWhenMinOrMaxValue()
962+
public async Task ExpirationAndIssuedWhenMinOrMaxValue()
962963
{
963964
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128)));
964965
var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
965966

966967
var claims = new[]
967968
{
968-
new Claim(ClaimTypes.NameIdentifier, "Bob")
969-
};
969+
new Claim(ClaimTypes.NameIdentifier, "Bob")
970+
};
970971

971972
var token = new JwtSecurityToken(
972973
issuer: "issuer.contoso.com",
@@ -995,8 +996,18 @@ public async Task ExpirationAndIssuedNullWhenMinOrMaxValue()
995996
Assert.Equal(HttpStatusCode.OK, response.Response.StatusCode);
996997
var responseBody = await response.Response.Content.ReadAsStringAsync();
997998
using var dom = JsonDocument.Parse(responseBody);
998-
Assert.Equal(JsonValueKind.Null, dom.RootElement.GetProperty("expires").ValueKind);
999999
Assert.Equal(JsonValueKind.Null, dom.RootElement.GetProperty("issued").ValueKind);
1000+
1001+
var expiresElement = dom.RootElement.GetProperty("expires");
1002+
Assert.Equal(JsonValueKind.String, expiresElement.ValueKind);
1003+
1004+
var elementValue = DateTime.Parse(expiresElement.GetString(), CultureInfo.InvariantCulture);
1005+
var elementValueUtc = elementValue.ToUniversalTime();
1006+
// roundtrip DateTime.MaxValue through parsing because it is lossy and we
1007+
// need equivalent values to compare against.
1008+
var max = DateTime.Parse(DateTime.MaxValue.ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture);
1009+
1010+
Assert.Equal(max, elementValueUtc);
10001011
}
10011012

10021013
[Fact]

0 commit comments

Comments
 (0)