Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Duende.IdentityModel and update package references. #212

Merged
merged 8 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0'">
<FrameworkVersionRuntime>8.0.0</FrameworkVersionRuntime>
<FrameworkVersionTesting>8.0.8</FrameworkVersionTesting>
<WilsonVersion>7.1.2</WilsonVersion> <!-- Used in samples -->
<FrameworkVersionTesting>8.0.11</FrameworkVersionTesting>
<WilsonVersion>8.0.1</WilsonVersion>
<YarpVersion>2.1.0</YarpVersion>
<IdentityServerVersion>7.0.6</IdentityServerVersion>
<IdentityServerVersion>7.1.0-preview.1</IdentityServerVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -13,9 +13,10 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />

<!-- runtime -->
<PackageReference Update="IdentityModel" Version="7.0.0" />
<PackageReference Update="Duende.AccessTokenManagement.OpenIdConnect" Version="3.0.0" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Duende.IdentityModel" Version="7.0.0" />
<PackageReference Update="Duende.AccessTokenManagement.OpenIdConnect" Version="3.1.0-preview.1" />
<!-- Need this version because so 'Microsoft.Extensions.Caching.Memory' is at least 8.0.1 that addresses known high severity vulnerability -->
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="8.0.10" />
<PackageReference Update="Microsoft.Extensions.Http" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(FrameworkVersionRuntime)" />
Expand All @@ -24,7 +25,7 @@
<PackageReference Update="Yarp.ReverseProxy" Version="$(YarpVersion)" />

<!-- samples -->
<PackageReference Update="Serilog.AspNetCore" Version="8.0.2" />
<PackageReference Update="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Update="Microsoft.IdentityModel.JsonWebTokens" Version="$(WilsonVersion)" />
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="$(WilsonVersion)" />

Expand All @@ -38,14 +39,14 @@
<PackageReference Update="Duende.IdentityServer" Version="$(IdentityServerVersion)" />

<PackageReference Update="CsQuery.NETStandard" Version="1.3.6.1" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Update="xunit" Version="2.4.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Update="FluentAssertions" Version="6.7.0" />
<PackageReference Update="coverlet.collector" Version="3.1.2">
<PackageReference Update="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
8 changes: 8 additions & 0 deletions Duende.Bff.v3.ncrunchsolution
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<SolutionConfiguration>
<Settings>
<AllowParallelTestExecution>True</AllowParallelTestExecution>
<EnableRDI>True</EnableRDI>
<RdiConfigured>True</RdiConfigured>
<SolutionConfigured>True</SolutionConfigured>
</Settings>
</SolutionConfiguration>
4 changes: 2 additions & 2 deletions migrations/UserSessionDb/UserSessionDb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.11" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Apis/Api.DPoP/Api.DPoP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityModel" />
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Apis/Api.DPoP/DPoP/DPoPExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.IdentityModel.Tokens;
Expand Down
4 changes: 2 additions & 2 deletions samples/Apis/Api.DPoP/DPoP/DPoPJwtBearerEvents.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using Microsoft.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using static IdentityModel.OidcConstants;
using static Duende.IdentityModel.OidcConstants;

namespace Api.DPoP;

Expand Down
2 changes: 1 addition & 1 deletion samples/Apis/Api.DPoP/DPoP/DPoPProofValidator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
Expand Down
2 changes: 1 addition & 1 deletion samples/Apis/Api.Isolated/Api.Isolated.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityModel" />
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Apis/Api/Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityModel" />
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/IdentityServer/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


using Duende.IdentityServer.Models;
using IdentityModel;
using Duende.IdentityModel;

namespace IdentityServerHost
{
Expand Down
1 change: 1 addition & 0 deletions samples/IdentityServer/IdentityServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<ItemGroup>
<PackageReference Include="Duende.IdentityServer" />
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Duende.IdentityServer.Events;
using Duende.IdentityServer.Extensions;
using Duende.IdentityServer.Services;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
Expand Down
2 changes: 1 addition & 1 deletion samples/IdentityServer/Pages/Consent/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Duende.IdentityServer.Models;
using Duende.IdentityServer.Services;
using Duende.IdentityServer.Validation;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
Expand Down
2 changes: 1 addition & 1 deletion samples/IdentityServer/Pages/Diagnostics/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// See LICENSE in the project root for license information.


using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using System.Text;
using System.Text.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Duende.IdentityServer.Events;
using Duende.IdentityServer.Services;
using Duende.IdentityServer.Test;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
Expand Down
2 changes: 1 addition & 1 deletion samples/IdentityServer/Pages/TestUsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// See LICENSE in the project root for license information.


using IdentityModel;
using Duende.IdentityModel;
using System.Security.Claims;
using System.Text.Json;
using Duende.IdentityServer;
Expand Down
2 changes: 1 addition & 1 deletion samples/IdentityServer/TokenExchangeGrantValidator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Duende.IdentityServer.Models;
using Duende.IdentityServer.Validation;
using IdentityModel;
using Duende.IdentityModel;

namespace IdentityServerHost;

Expand Down
4 changes: 2 additions & 2 deletions samples/JS8.EF/JS8.EF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.11" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions samples/JS8/ImpersonationAccessTokenRetriever.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Net.Http;
using System.Threading.Tasks;
using Duende.Bff;
using IdentityModel;
using IdentityModel.Client;
using Duende.IdentityModel;
using Duende.IdentityModel.Client;
using Microsoft.Extensions.Logging;

namespace Host8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" />
<PackageReference Include="Microsoft.Extensions.Http" />
<!-- Explicitly taking this version so that we don't pull in vulnerable old versions. -->
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Diagnostics;
using System.Security.Claims;
using Duende.Bff.Blazor.Client;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Server;
Expand Down
2 changes: 1 addition & 1 deletion src/Duende.Bff.Yarp/AccessTokenRequestTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using Duende.AccessTokenManagement;
using Duende.Bff.Logging;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.Extensions.Logging;
using Yarp.ReverseProxy.Transforms;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// See LICENSE in the project root for license information.

using Duende.AccessTokenManagement.OpenIdConnect;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Logging;
Expand Down
2 changes: 1 addition & 1 deletion src/Duende.Bff/Extensions/HttpContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using Duende.AccessTokenManagement;
using Duende.AccessTokenManagement.OpenIdConnect;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;

Expand Down
2 changes: 1 addition & 1 deletion src/Duende.Bff/General/DefaultAccessTokenRetriever.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using System.Threading.Tasks;
using Duende.Bff.Logging;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Logging;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -12,11 +12,11 @@
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -10,12 +10,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="coverlet.collector" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/Duende.Bff.Tests/Endpoints/RemoteEndpointTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public async Task test_dpop()
opts.DPoPJsonWebKey = jwk;
});
};
BffHost.InitializeAsync().Wait();
await BffHost.InitializeAsync();

var req = new HttpRequestMessage(HttpMethod.Get, BffHost.Url("/api_client/test"));
req.Headers.Add("x-csrf", "1");
Expand Down
2 changes: 1 addition & 1 deletion test/Duende.Bff.Tests/TestHosts/IdentityServerHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Duende.IdentityServer;
using Duende.IdentityServer.Models;
using Duende.IdentityServer.Services;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
Expand Down
Loading