From b906ab942ad0c15883d687ba80c0a167ac647365 Mon Sep 17 00:00:00 2001 From: Vadim Belov Date: Wed, 13 Nov 2024 02:28:45 -0800 Subject: [PATCH] Update .NET version in GitHub Actions workflow Updated the .NET version used in the GitHub Actions workflow for building and packing the project from version 8.0.x to version 9.0.x. This ensures compatibility with the latest features and improvements in .NET 9.0.x. --- .github/workflows/publish-release.yml | 2 +- .../Extensions/ConfigurationExtensions.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index fcc12c5..a9d08e6 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -36,7 +36,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Build and Pack NuGet package run: | cd Sources diff --git a/Sources/EasyExtensions.AspNetCore.Authorization/Extensions/ConfigurationExtensions.cs b/Sources/EasyExtensions.AspNetCore.Authorization/Extensions/ConfigurationExtensions.cs index d1ece35..7d46684 100644 --- a/Sources/EasyExtensions.AspNetCore.Authorization/Extensions/ConfigurationExtensions.cs +++ b/Sources/EasyExtensions.AspNetCore.Authorization/Extensions/ConfigurationExtensions.cs @@ -23,6 +23,7 @@ internal static JwtSettings GetJwtSettings(this IConfiguration configuration) string key = (!jwtSettings.Exists() ? configuration["JwtKey"] : jwtSettings["Key"]) ?? throw new KeyNotFoundException("JwtSettings.Key or JwtKey is not set"); + string algorithm = key.Length switch { 256 / 8 => SecurityAlgorithms.HmacSha256,