From c2b53cefd8ef994ffaf1d6c378050c7ed91c7040 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 13 Nov 2024 15:02:08 +0300 Subject: [PATCH] .NET 9 support (#19) * Added support for .NET 9 --------- Co-authored-by: Alexey Poltorak --- .github/workflows/ci-cd.yml | 14 +++++------ .../Abblix.DependencyInjection.csproj | 15 ++++++++---- .../Abblix.Jwt.UnitTests.csproj | 2 +- Abblix.Jwt/Abblix.Jwt.csproj | 18 ++++++++++---- .../Abblix.Oidc.Server.Mvc.csproj | 8 +++---- .../Abblix.Oidc.Server.Tests.csproj | 6 ++--- .../Abblix.Oidc.Server.UnitTests.csproj | 2 +- Abblix.Oidc.Server/Abblix.Oidc.Server.csproj | 24 ++++++++++++------- .../Endpoints/ServiceCollectionExtensions.cs | 6 ++--- .../Features/ServiceCollectionExtensions.cs | 2 +- .../Abblix.Utils.UnitTests.csproj | 2 +- Abblix.Utils/Abblix.Utils.csproj | 7 +++--- README.md | 2 +- 13 files changed, 65 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 97e538b7..dfbf0a35 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -11,13 +11,13 @@ jobs: outputs: version: ${{ steps.set_version.outputs.new_version }} steps: - - uses: actions/checkout@v4.1.2 + - uses: actions/checkout@v4.2.2 - name: Bump version and push tag id: set_version uses: mathieudutour/github-tag-action@v6.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} - default_bump: patch # Automatically bump patch version + default_bump: patch # Automatically bump a patch version release_branches: release.*,hotfix.*,master pre_release_branches: feature.* @@ -25,11 +25,11 @@ jobs: needs: versioning runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.2 + - uses: actions/checkout@v4.2.2 - name: Setup .NET - uses: actions/setup-dotnet@v4.0.0 + uses: actions/setup-dotnet@v4.1.0 with: - dotnet-version: '8.0' + dotnet-version: '9.0' - name: Restore dependencies run: dotnet restore - name: Build @@ -39,7 +39,7 @@ jobs: - name: Pack run: dotnet pack --no-build -c Release -o nupkg /p:PackageVersion=${{ needs.versioning.outputs.version }} - name: Upload NuGet packages as artifacts - uses: actions/upload-artifact@v4.3.1 + uses: actions/upload-artifact@v4.4.3 with: name: nuget-packages path: nupkg/*.nupkg @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download NuGet packages artifacts - uses: actions/download-artifact@v4.1.4 + uses: actions/download-artifact@v4.1.8 with: name: nuget-packages path: nupkg diff --git a/Abblix.DependencyInjection/Abblix.DependencyInjection.csproj b/Abblix.DependencyInjection/Abblix.DependencyInjection.csproj index 3a280ef7..7d6d78ae 100644 --- a/Abblix.DependencyInjection/Abblix.DependencyInjection.csproj +++ b/Abblix.DependencyInjection/Abblix.DependencyInjection.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 enable enable true @@ -20,12 +20,17 @@ For detailed release notes, visit: https://github.com/Abblix/Oidc.Server/releases Abblix.png true - 1.2.0.0 - 1.2.0.0 + 1.3.0.0 + 1.3.0.0 + 1.3.0.0 - - + + + + + + diff --git a/Abblix.Jwt.UnitTests/Abblix.Jwt.UnitTests.csproj b/Abblix.Jwt.UnitTests/Abblix.Jwt.UnitTests.csproj index c0c21410..6d6505bf 100644 --- a/Abblix.Jwt.UnitTests/Abblix.Jwt.UnitTests.csproj +++ b/Abblix.Jwt.UnitTests/Abblix.Jwt.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable diff --git a/Abblix.Jwt/Abblix.Jwt.csproj b/Abblix.Jwt/Abblix.Jwt.csproj index fdfeee36..3a3f942e 100644 --- a/Abblix.Jwt/Abblix.Jwt.csproj +++ b/Abblix.Jwt/Abblix.Jwt.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 enable enable true @@ -20,13 +20,21 @@ For detailed release notes, visit: https://github.com/Abblix/Oidc.Server/releases Abblix.png true - 1.2.0.0 - 1.2.0.0 + 1.3.0.0 + 1.3.0.0 + 1.3.0.0 + + + + + + + + - - + diff --git a/Abblix.Oidc.Server.Mvc/Abblix.Oidc.Server.Mvc.csproj b/Abblix.Oidc.Server.Mvc/Abblix.Oidc.Server.Mvc.csproj index b5364fc1..c57a3fe3 100644 --- a/Abblix.Oidc.Server.Mvc/Abblix.Oidc.Server.Mvc.csproj +++ b/Abblix.Oidc.Server.Mvc/Abblix.Oidc.Server.Mvc.csproj @@ -1,11 +1,10 @@ - net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 enable enable Linux - net6.0;net7.0;net8.0 true true Abblix.OIDC.Server.MVC @@ -22,8 +21,9 @@ For detailed release notes, visit: https://github.com/Abblix/Oidc.Server/releases Abblix.png true - 1.2.0.0 - 1.2.0.0 + 1.3.0.0 + 1.3.0.0 + 1.3.0.0 diff --git a/Abblix.Oidc.Server.Tests/Abblix.Oidc.Server.Tests.csproj b/Abblix.Oidc.Server.Tests/Abblix.Oidc.Server.Tests.csproj index 7adcfb1d..34254e73 100644 --- a/Abblix.Oidc.Server.Tests/Abblix.Oidc.Server.Tests.csproj +++ b/Abblix.Oidc.Server.Tests/Abblix.Oidc.Server.Tests.csproj @@ -1,12 +1,12 @@  - net8.0 + net9.0 - - + + diff --git a/Abblix.Oidc.Server.UnitTests/Abblix.Oidc.Server.UnitTests.csproj b/Abblix.Oidc.Server.UnitTests/Abblix.Oidc.Server.UnitTests.csproj index d65cd6b5..bddf9dbd 100644 --- a/Abblix.Oidc.Server.UnitTests/Abblix.Oidc.Server.UnitTests.csproj +++ b/Abblix.Oidc.Server.UnitTests/Abblix.Oidc.Server.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 diff --git a/Abblix.Oidc.Server/Abblix.Oidc.Server.csproj b/Abblix.Oidc.Server/Abblix.Oidc.Server.csproj index a4ef8e62..63ef2560 100644 --- a/Abblix.Oidc.Server/Abblix.Oidc.Server.csproj +++ b/Abblix.Oidc.Server/Abblix.Oidc.Server.csproj @@ -1,12 +1,12 @@  + net6.0;net7.0;net8.0;net9.0 enable true Abblix.OIDC.Server Abblix OIDC Server Flexible OpenID Connect and OAuth 2.0 server-side implementation for modern ASP.NET projects - net6.0;net7.0;net8.0 true Abblix LLP https://www.abblix.com/abblix-oidc-server @@ -19,8 +19,9 @@ For detailed release notes, visit: https://github.com/Abblix/Oidc.Server/releases Abblix.png true - 1.2.0.0 - 1.2.0.0 + 1.3.0.0 + 1.3.0.0 + 1.3.0.0 @@ -31,11 +32,18 @@ - - - - - + + + + + + + + + + + + diff --git a/Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs b/Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs index f07f2821..ad5b5ec0 100644 --- a/Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs +++ b/Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs @@ -95,9 +95,9 @@ public static IServiceCollection AddAuthorizationRequestFetchers(this IServiceCo .AddSingleton() // Add individual authorization request fetchers as singletons - .AddSingleton() - .AddSingleton() - .AddSingleton() + .AddScoped() + .AddScoped() + .AddScoped() // Compose the individual fetchers into a composite fetcher .Compose(); diff --git a/Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs b/Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs index f305dfec..e3f91b96 100644 --- a/Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs +++ b/Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs @@ -404,7 +404,7 @@ public static IServiceCollection AddUserInfo(this IServiceCollection services) /// modifications and additions to be chained. public static IServiceCollection AddRequestObject(this IServiceCollection services) { - services.TryAddSingleton(); + services.TryAddScoped(); return services; } diff --git a/Abblix.Utils.UnitTests/Abblix.Utils.UnitTests.csproj b/Abblix.Utils.UnitTests/Abblix.Utils.UnitTests.csproj index c9654cf2..c83cddf7 100644 --- a/Abblix.Utils.UnitTests/Abblix.Utils.UnitTests.csproj +++ b/Abblix.Utils.UnitTests/Abblix.Utils.UnitTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable diff --git a/Abblix.Utils/Abblix.Utils.csproj b/Abblix.Utils/Abblix.Utils.csproj index 9c75f97a..3ca62a16 100644 --- a/Abblix.Utils/Abblix.Utils.csproj +++ b/Abblix.Utils/Abblix.Utils.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 enable enable true @@ -20,8 +20,9 @@ For detailed release notes, visit: https://github.com/Abblix/Oidc.Server/releases Abblix.png true - 1.2.0.0 - 1.2.0.0 + 1.3.0.0 + 1.3.0.0 + 1.3.0.0 diff --git a/README.md b/README.md index c6518621..66616665 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Abblix OIDC Server](https://resources.abblix.com/imgs/jpg/abblix-oidc-server-github-banner.jpg)](https://www.abblix.com/abblix-oidc-server) -[![.NET](https://img.shields.io/badge/.NET-6.0%2C%207.0%2C%208.0-512BD4)](https://docs.abblix.com/docs/technical-requirements) +[![.NET](https://img.shields.io/badge/.NET-6.0%2C%207.0%2C%208.0%2C%209.0-512BD4)](https://docs.abblix.com/docs/technical-requirements) [![language](https://img.shields.io/badge/language-C%23-239120)](https://learn.microsoft.com/ru-ru/dotnet/csharp/tour-of-csharp/overview) [![OS](https://img.shields.io/badge/OS-linux%2C%20windows%2C%20macOS-0078D4)](https://docs.abblix.com/docs/technical-requirements) [![CPU](https://img.shields.io/badge/CPU-x86%2C%20x64%2C%20ARM%2C%20ARM64-FF8C00)](https://docs.abblix.com/docs/technical-requirements)