diff --git a/CHANGELOG.md b/CHANGELOG.md index 1210db4f7..35b9c0356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,28 +1,34 @@ # Unreleased -# 10.1.1 +# JWT 11.0.0-beta1, JWT.Extensions.AspNetCore 11.0.0-beta1, JWT.Extensions.DependencyInjection 3.0.0-beta1 + +- Remove System.Text.Json when referring .NET 6 and higher as it's provided by the framework +- Updated Newtonsoft.Json to version to 13.0.3 +- Updated System.Text.Json to version 6.0.9 + +# JWT 10.1.1 - Made ctor of ValidationParameters public, set default values for boolean properties to true -# 10.1.0 +# JWT 10.1.0 - Unmarked HMAC SHA based algorithms as insecure and obsolete (was done in 9.0.0-beta4) -# 10.0.3 +# JWT 10.0.3 - Added default ctor to JwtHeader and decorated it with `[JsonConstructor]` -# 10.0.2 +# JWT 10.0.2 - Disallowed Encode(payload) with AddClaim(s) -# 10.0.1 +# JWT 10.0.1 - Fixed deserializing JWT header - Updated Newtonsoft.Json to version to 13.0.2 - Updated System.Text.Json to version 6.0.7 -# 10.0.0 +# JWT 10.0.0 - **Breaking:** Made System.Text.Json the default serializer on the platforms where it's available - **Breaking:** Made verify=true by default in IJwtDecoder methods diff --git a/Directory.Build.props b/Directory.Build.props index 6c494e165..5fafe8a20 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -27,7 +27,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/JWT.sln b/JWT.sln index e790a53f0..f94556edd 100644 --- a/JWT.sln +++ b/JWT.sln @@ -51,9 +51,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{44284230 EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C86A941F-F655-4EF5-A6A1-47BD4A7FC748}" - ProjectSection(SolutionItems) = preProject - src\Directory.Build.targets = src\Directory.Build.targets - EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JWT.Tests.Net70", "tests\JWT.Tests.Net70\JWT.Tests.Net70.csproj", "{D7F24AC9-D178-4BAB-BF93-4BAD8028416D}" EndProject diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets deleted file mode 100644 index 0930dcbca..000000000 --- a/src/Directory.Build.targets +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - $(DefineConstants);MODERN_DOTNET - - - - \ No newline at end of file diff --git a/src/JWT.Extensions.AspNetCore/JWT.Extensions.AspNetCore.csproj b/src/JWT.Extensions.AspNetCore/JWT.Extensions.AspNetCore.csproj index 232f16351..b438278ae 100644 --- a/src/JWT.Extensions.AspNetCore/JWT.Extensions.AspNetCore.csproj +++ b/src/JWT.Extensions.AspNetCore/JWT.Extensions.AspNetCore.csproj @@ -10,9 +10,9 @@ Alexander Batishchev jwt;json;asp.net;asp.net core;.net core;authorization MIT - 10.1.1 - 10.0.0.0 - 10.0.0.0 + 11.0.0-beta1 + 11.0.0.0 + 11.0.0.0 JWT.Extensions.AspNetCore true @@ -28,15 +28,16 @@ - - - - + + + + + - + - + \ No newline at end of file diff --git a/src/JWT.Extensions.DependencyInjection/JWT.Extensions.DependencyInjection.csproj b/src/JWT.Extensions.DependencyInjection/JWT.Extensions.DependencyInjection.csproj index aed93e459..8c613caae 100644 --- a/src/JWT.Extensions.DependencyInjection/JWT.Extensions.DependencyInjection.csproj +++ b/src/JWT.Extensions.DependencyInjection/JWT.Extensions.DependencyInjection.csproj @@ -1,8 +1,7 @@ - netstandard2.0 - .NETStandard + netstandard2.0;net6.0 @@ -11,9 +10,9 @@ Alexander Batishchev jwt;json;asp.net;asp.net core;.net core;authorization;dependenсy injection MIT - 2.2.3 - 2.0.0.0 - 2.0.0.0 + 3.0.0-beta1 + 3.0.0.0 + 3.0.0.0 JWT true @@ -30,12 +29,11 @@ - - + - + \ No newline at end of file diff --git a/src/JWT/Builder/JwtBuilder.cs b/src/JWT/Builder/JwtBuilder.cs index cf5570cd2..3f7957c42 100644 --- a/src/JWT/Builder/JwtBuilder.cs +++ b/src/JWT/Builder/JwtBuilder.cs @@ -5,7 +5,7 @@ using JWT.Serializers; using Newtonsoft.Json; -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER using System.Text.Json.Serialization; #endif @@ -489,7 +489,7 @@ private string GetPropName(MemberInfo prop) } break; } -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER case SystemTextSerializer: { if (attribute is JsonPropertyNameAttribute stjProperty) diff --git a/src/JWT/Builder/JwtHeader.cs b/src/JWT/Builder/JwtHeader.cs index fb41f80a4..0cdb694dc 100644 --- a/src/JWT/Builder/JwtHeader.cs +++ b/src/JWT/Builder/JwtHeader.cs @@ -1,4 +1,4 @@ -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER using System.Text.Json.Serialization; #endif @@ -11,50 +11,50 @@ namespace JWT.Builder /// public class JwtHeader { -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER [System.Text.Json.Serialization.JsonConstructor] public JwtHeader() { } -#endif +#endif [JsonProperty("typ")] -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER [JsonPropertyName("typ")] #endif public string Type { get; set; } [JsonProperty("cty")] -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER [JsonPropertyName("cty")] #endif public string ContentType { get; set; } [JsonProperty("alg")] -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER [JsonPropertyName("alg")] #endif public string Algorithm { get; set; } [JsonProperty("kid")] -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER [JsonPropertyName("kid")] #endif public string KeyId { get; set; } [JsonProperty("x5u")] -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER [JsonPropertyName("x5u")] #endif public string X5u { get; set; } [JsonProperty("x5c")] -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER [JsonPropertyName("x5c")] #endif public string[] X5c { get; set; } [JsonProperty("x5t")] -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER [JsonPropertyName("x5t")] #endif public string X5t { get; set; } diff --git a/src/JWT/JWT.csproj b/src/JWT/JWT.csproj index bc3413314..e53002f41 100644 --- a/src/JWT/JWT.csproj +++ b/src/JWT/JWT.csproj @@ -1,4 +1,4 @@ - + netstandard1.3;netstandard2.0;net6.0;net35;net40;net462; @@ -25,9 +25,9 @@ - 10.1.1 - 10.0.0.0 - 10.0.0.0 + 11.0.0-beta1 + 11.0.0.0 + 11.0.0.0 @@ -41,8 +41,11 @@ - - + + + + + @@ -50,6 +53,7 @@ + all @@ -61,4 +65,4 @@ - + \ No newline at end of file diff --git a/src/JWT/Serializers/Converters/DictionaryStringObjectJsonConverter.cs b/src/JWT/Serializers/Converters/DictionaryStringObjectJsonConverter.cs index cbf85d410..fd2b667f3 100644 --- a/src/JWT/Serializers/Converters/DictionaryStringObjectJsonConverter.cs +++ b/src/JWT/Serializers/Converters/DictionaryStringObjectJsonConverter.cs @@ -1,4 +1,4 @@ -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER using System; using System.Collections.Generic; using System.Text.Json; diff --git a/src/JWT/Serializers/DefaultJsonSerializerFactory.cs b/src/JWT/Serializers/DefaultJsonSerializerFactory.cs index 86cc3e4d0..3fe91765d 100644 --- a/src/JWT/Serializers/DefaultJsonSerializerFactory.cs +++ b/src/JWT/Serializers/DefaultJsonSerializerFactory.cs @@ -6,7 +6,7 @@ public sealed class DefaultJsonSerializerFactory : IJsonSerializerFactory public DefaultJsonSerializerFactory() { -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER _jsonSerializer = new SystemTextSerializer(); #else _jsonSerializer = new JsonNetSerializer(); diff --git a/src/JWT/Serializers/SystemTextSerializer.cs b/src/JWT/Serializers/SystemTextSerializer.cs index 84d9849d0..05095e432 100644 --- a/src/JWT/Serializers/SystemTextSerializer.cs +++ b/src/JWT/Serializers/SystemTextSerializer.cs @@ -1,4 +1,4 @@ -#if MODERN_DOTNET +#if NET462_OR_GREATER || NET6_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER using System; using System.Text.Json; using JWT.Serializers.Converters; diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 68806dc90..1d1a7ca9b 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -30,12 +30,12 @@ - + - + - - + + \ No newline at end of file diff --git a/tests/JWT.Extensions.AspNetCore.Tests/JWT.Extensions.AspNetCore.Tests.csproj b/tests/JWT.Extensions.AspNetCore.Tests/JWT.Extensions.AspNetCore.Tests.csproj index d1187036a..499429354 100644 --- a/tests/JWT.Extensions.AspNetCore.Tests/JWT.Extensions.AspNetCore.Tests.csproj +++ b/tests/JWT.Extensions.AspNetCore.Tests/JWT.Extensions.AspNetCore.Tests.csproj @@ -5,10 +5,15 @@ - - - + + + + + + + + @@ -16,4 +21,4 @@ - \ No newline at end of file + diff --git a/tests/JWT.Extensions.DependencyInjection.Tests/JWT.Extensions.DependencyInjection.Tests.csproj b/tests/JWT.Extensions.DependencyInjection.Tests/JWT.Extensions.DependencyInjection.Tests.csproj index 80ca57f28..3213e1208 100644 --- a/tests/JWT.Extensions.DependencyInjection.Tests/JWT.Extensions.DependencyInjection.Tests.csproj +++ b/tests/JWT.Extensions.DependencyInjection.Tests/JWT.Extensions.DependencyInjection.Tests.csproj @@ -8,9 +8,13 @@ + + + + - + \ No newline at end of file