Skip to content

Commit 10726cc

Browse files
Update Microsoft.IdentityModel to 7.0.0-preview4 (#50415)
* Update Microsoft.Identity.Model to 7.0.0-preview4 * Update dependencies from https://github.com/dotnet/source-build-externals build 20230830.1 Microsoft.SourceBuild.Intermediate.source-build-externals From Version 8.0.0-alpha.1.23429.1 -> To Version 8.0.0-alpha.1.23430.1 * Update dependencies from https://github.com/dotnet/source-build-externals build 20230830.3 Microsoft.SourceBuild.Intermediate.source-build-externals From Version 8.0.0-alpha.1.23430.1 -> To Version 8.0.0-alpha.1.23430.3 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 23bd3b3 commit 10726cc

File tree

4 files changed

+22
-24
lines changed

4 files changed

+22
-24
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>4122c63a13cfe40e97ac1f9ef01d8110a66943f4</Sha>
191191
</Dependency>
192-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23429.1">
192+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23430.3">
193193
<Uri>https://github.com/dotnet/source-build-externals</Uri>
194-
<Sha>0603839a51f5e18b89c60a3690aff5e81fa666ca</Sha>
194+
<Sha>c88d8d75ed6b8d426b7fad50eadd7f6fec46a7e4</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-preview3</IdentityModelVersion>
14+
<IdentityModelVersion>7.0.0-preview4</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.23419.1</MicrosoftDotNetBuildTasksTemplatingVersion>
163163
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.23419.1</MicrosoftDotNetRemoteExecutorVersion>
164164
<!-- Packages from dotnet/source-build-externals -->
165-
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23429.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
165+
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23430.3</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
166166
<!-- Packages from dotnet/source-build-reference-packages -->
167167
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>8.0.0-alpha.1.23428.2</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>
168168
<!-- Packages from dotnet/symreader -->

src/Security/Authentication/WsFederation/src/WsFederationHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ protected override async Task HandleChallengeAsync(AuthenticationProperties prop
9898
var wsFederationMessage = new WsFederationMessage()
9999
{
100100
IssuerAddress = _configuration.TokenEndpoint ?? string.Empty,
101-
Wtrealm = Options.Wtrealm!, // TODO: https://github.com/dotnet/aspnetcore/issues/50242
101+
Wtrealm = Options.Wtrealm,
102102
Wa = WsFederationConstants.WsFederationActions.SignIn,
103103
};
104104

@@ -195,7 +195,7 @@ protected override async Task<HandleRequestResult> HandleRemoteAuthenticateAsync
195195
{
196196
// Extract the user state from properties and reset.
197197
properties.Items.TryGetValue(WsFederationDefaults.UserstatePropertiesKey, out var userState);
198-
wsFederationMessage.Wctx = userState!; // TODO: '!' can be removed with https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/2240
198+
wsFederationMessage.Wctx = userState;
199199
}
200200

201201
var messageReceivedContext = new MessageReceivedContext(Context, Scheme, Options, properties)
@@ -425,7 +425,7 @@ public virtual async Task SignOutAsync(AuthenticationProperties? properties)
425425
var wsFederationMessage = new WsFederationMessage()
426426
{
427427
IssuerAddress = _configuration.TokenEndpoint ?? string.Empty,
428-
Wtrealm = Options.Wtrealm!, // TODO: https://github.com/dotnet/aspnetcore/issues/50242
428+
Wtrealm = Options.Wtrealm,
429429
Wa = WsFederationConstants.WsFederationActions.SignOut,
430430
};
431431

src/Security/Authentication/test/JwtBearerTests_Handler.cs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -914,23 +914,21 @@ public async Task ExpirationAndIssuedSetOnAuthenticateResult()
914914
public async Task ExpirationAndIssuedWhenMinOrMaxValue()
915915
{
916916
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128)));
917-
//var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
918-
919-
//var claims = new[]
920-
//{
921-
// new Claim(ClaimTypes.NameIdentifier, "Bob")
922-
//};
923-
924-
//var token = new JwtSecurityToken(
925-
// issuer: "issuer.contoso.com",
926-
// audience: "audience.contoso.com",
927-
// claims: claims,
928-
// expires: DateTime.MaxValue,
929-
// signingCredentials: creds);
930-
931-
//var tokenText = new JwtSecurityTokenHandler().WriteToken(token);
932-
// TODO: when https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/2261 is fixed, uncomment the above code and remove this hard-coded string
933-
var tokenText = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkJvYiIsImV4cCI6MjUzNDAyMzAwODAwLCJpc3MiOiJpc3N1ZXIuY29udG9zby5jb20iLCJhdWQiOiJhdWRpZW5jZS5jb250b3NvLmNvbSJ9.0zvasyAh-GmjR_o46QSRCoQ9VaSXJjW5_YMcR6qy-jw";
917+
var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
918+
919+
var claims = new[]
920+
{
921+
new Claim(ClaimTypes.NameIdentifier, "Bob")
922+
};
923+
924+
var token = new JwtSecurityToken(
925+
issuer: "issuer.contoso.com",
926+
audience: "audience.contoso.com",
927+
claims: claims,
928+
expires: DateTime.MaxValue,
929+
signingCredentials: creds);
930+
931+
var tokenText = new JwtSecurityTokenHandler().WriteToken(token);
934932

935933
using var host = await CreateHost(o =>
936934
{

0 commit comments

Comments
 (0)