diff --git a/Directory.Build.props b/Directory.Build.props
index 32d532c8..d3047adb 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -67,10 +67,39 @@
+
+
+ $(DefineConstants);SUPPORTS_ECDSA
+
+
+
+ $(DefineConstants);SUPPORTS_CERTIFICATE_GENERATION
+ $(DefineConstants);SUPPORTS_DIRECT_KEY_CREATION_WITH_SPECIFIED_SIZE
+ $(DefineConstants);SUPPORTS_EPHEMERAL_KEY_SETS
+ $(DefineConstants);SUPPORTS_KEY_DERIVATION_WITH_SPECIFIED_HASH_ALGORITHM
+
+
+
+ $(DefineConstants);SUPPORTS_BASE64_SPAN_CONVERSION
+ $(DefineConstants);SUPPORTS_STATIC_RANDOM_NUMBER_GENERATOR_METHODS
+ $(DefineConstants);SUPPORTS_TIME_CONSTANT_COMPARISONS
+
+
+
+ $(DefineConstants);SUPPORTS_BCL_ASYNC_ENUMERABLE
+ $(DefineConstants);SUPPORTS_GENERIC_HOST
+ $(DefineConstants);SUPPORTS_SERVICE_PROVIDER_IN_HTTP_MESSAGE_HANDLER_BUILDER
+
+
diff --git a/src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj b/src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj
index 3888b0f1..0e312257 100644
--- a/src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj
+++ b/src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1
+ net461;netstandard2.0;netstandard2.1
@@ -9,16 +9,22 @@
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs
index 21e90944..a0f345b0 100644
--- a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs
+++ b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs
@@ -1263,9 +1263,9 @@ namespace OpenIddict.Core
// Write the hashing algorithm version.
BinaryPrimitives.WriteUInt32BigEndian(payload.Slice(1, 4), algorithm switch
{
- { Name: nameof(SHA1) } => 0,
- { Name: nameof(SHA256) } => 1,
- { Name: nameof(SHA512) } => 2,
+ var name when name == HashAlgorithmName.SHA1 => 0,
+ var name when name == HashAlgorithmName.SHA256 => 1,
+ var name when name == HashAlgorithmName.SHA512 => 2,
_ => throw new InvalidOperationException("The specified HMAC algorithm is not valid.")
});
@@ -1394,9 +1394,10 @@ namespace OpenIddict.Core
#else
var generator = new Pkcs5S2ParametersGenerator(algorithm switch
{
- { Name: nameof(SHA1) } => (IDigest) new Sha1Digest(),
- { Name: nameof(SHA256) } => new Sha256Digest(),
- { Name: nameof(SHA512) } => new Sha512Digest(),
+ var name when name == HashAlgorithmName.SHA1 => new Sha1Digest(),
+ var name when name == HashAlgorithmName.SHA256 => new Sha256Digest(),
+ var name when name == HashAlgorithmName.SHA512 => new Sha512Digest(),
+
_ => throw new InvalidOperationException("The specified hash algorithm is not valid.")
});
diff --git a/src/OpenIddict.Core/OpenIddict.Core.csproj b/src/OpenIddict.Core/OpenIddict.Core.csproj
index 0738b0aa..f412e23d 100644
--- a/src/OpenIddict.Core/OpenIddict.Core.csproj
+++ b/src/OpenIddict.Core/OpenIddict.Core.csproj
@@ -1,7 +1,7 @@
- net472;netstandard2.0;netstandard2.1
+ net461;net472;netstandard2.0;netstandard2.1
@@ -14,25 +14,18 @@
-
-
-
+
+
-
- $(DefineConstants);SUPPORTS_KEY_DERIVATION_WITH_SPECIFIED_HASH_ALGORITHM
-
-
-
- $(DefineConstants);SUPPORTS_BASE64_SPAN_CONVERSION
- $(DefineConstants);SUPPORTS_STATIC_RANDOM_NUMBER_GENERATOR_METHODS
- $(DefineConstants);SUPPORTS_TIME_CONSTANT_COMPARISONS
-
+
+
+
diff --git a/src/OpenIddict.EntityFramework.Models/OpenIddict.EntityFramework.Models.csproj b/src/OpenIddict.EntityFramework.Models/OpenIddict.EntityFramework.Models.csproj
index ac709f6a..c23bd436 100644
--- a/src/OpenIddict.EntityFramework.Models/OpenIddict.EntityFramework.Models.csproj
+++ b/src/OpenIddict.EntityFramework.Models/OpenIddict.EntityFramework.Models.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ net461;netstandard2.0
diff --git a/src/OpenIddict.EntityFramework/OpenIddict.EntityFramework.csproj b/src/OpenIddict.EntityFramework/OpenIddict.EntityFramework.csproj
index a1d190bf..ce7d3b6d 100644
--- a/src/OpenIddict.EntityFramework/OpenIddict.EntityFramework.csproj
+++ b/src/OpenIddict.EntityFramework/OpenIddict.EntityFramework.csproj
@@ -16,7 +16,6 @@
-
diff --git a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddict.EntityFrameworkCore.Models.csproj b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddict.EntityFrameworkCore.Models.csproj
index 48d36bcf..34675b6b 100644
--- a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddict.EntityFrameworkCore.Models.csproj
+++ b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddict.EntityFrameworkCore.Models.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ net461;netstandard2.0
diff --git a/src/OpenIddict.EntityFrameworkCore/OpenIddict.EntityFrameworkCore.csproj b/src/OpenIddict.EntityFrameworkCore/OpenIddict.EntityFrameworkCore.csproj
index efe311f3..32e7cd2a 100644
--- a/src/OpenIddict.EntityFrameworkCore/OpenIddict.EntityFrameworkCore.csproj
+++ b/src/OpenIddict.EntityFrameworkCore/OpenIddict.EntityFrameworkCore.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1
+ net461;netstandard2.0;netstandard2.1
@@ -15,7 +15,6 @@
-
@@ -23,8 +22,4 @@
-
- $(DefineConstants);SUPPORTS_BCL_ASYNC_ENUMERABLE
-
-
diff --git a/src/OpenIddict.MongoDb.Models/OpenIddict.MongoDb.Models.csproj b/src/OpenIddict.MongoDb.Models/OpenIddict.MongoDb.Models.csproj
index be028480..0b6fd067 100644
--- a/src/OpenIddict.MongoDb.Models/OpenIddict.MongoDb.Models.csproj
+++ b/src/OpenIddict.MongoDb.Models/OpenIddict.MongoDb.Models.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ net461;netstandard2.0
false
false
diff --git a/src/OpenIddict.MongoDb/OpenIddict.MongoDb.csproj b/src/OpenIddict.MongoDb/OpenIddict.MongoDb.csproj
index 32b1bff8..212319a1 100644
--- a/src/OpenIddict.MongoDb/OpenIddict.MongoDb.csproj
+++ b/src/OpenIddict.MongoDb/OpenIddict.MongoDb.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1
+ net461;netstandard2.0;netstandard2.1
false
false
@@ -17,7 +17,6 @@
-
diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddict.Server.AspNetCore.csproj b/src/OpenIddict.Server.AspNetCore/OpenIddict.Server.AspNetCore.csproj
index 1bdc97a0..eca31f7f 100644
--- a/src/OpenIddict.Server.AspNetCore/OpenIddict.Server.AspNetCore.csproj
+++ b/src/OpenIddict.Server.AspNetCore/OpenIddict.Server.AspNetCore.csproj
@@ -13,22 +13,16 @@
-
+
-
+
-
-
-
-
-
- $(DefineConstants);SUPPORTS_STATIC_RANDOM_NUMBER_GENERATOR_METHODS
-
-
diff --git a/src/OpenIddict.Server.DataProtection/OpenIddict.Server.DataProtection.csproj b/src/OpenIddict.Server.DataProtection/OpenIddict.Server.DataProtection.csproj
index 696d20aa..78d4be56 100644
--- a/src/OpenIddict.Server.DataProtection/OpenIddict.Server.DataProtection.csproj
+++ b/src/OpenIddict.Server.DataProtection/OpenIddict.Server.DataProtection.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1;netcoreapp3.1
+ net461;netcoreapp3.1;netstandard2.0;netstandard2.1
@@ -13,15 +13,13 @@
-
+
-
-
-
-
-
+
diff --git a/src/OpenIddict.Server.Owin/OpenIddict.Server.Owin.csproj b/src/OpenIddict.Server.Owin/OpenIddict.Server.Owin.csproj
index f9a62e15..0892e17a 100644
--- a/src/OpenIddict.Server.Owin/OpenIddict.Server.Owin.csproj
+++ b/src/OpenIddict.Server.Owin/OpenIddict.Server.Owin.csproj
@@ -14,7 +14,6 @@
-
diff --git a/src/OpenIddict.Server/OpenIddict.Server.csproj b/src/OpenIddict.Server/OpenIddict.Server.csproj
index 7e094ab0..ad8f04ec 100644
--- a/src/OpenIddict.Server/OpenIddict.Server.csproj
+++ b/src/OpenIddict.Server/OpenIddict.Server.csproj
@@ -17,7 +17,6 @@ To use the server feature on ASP.NET Core or OWIN/Katana, reference the OpenIddi
-
@@ -28,22 +27,4 @@ To use the server feature on ASP.NET Core or OWIN/Katana, reference the OpenIddi
-
- $(DefineConstants);SUPPORTS_ECDSA
-
-
-
- $(DefineConstants);SUPPORTS_CERTIFICATE_GENERATION
- $(DefineConstants);SUPPORTS_DIRECT_KEY_CREATION_WITH_SPECIFIED_SIZE
- $(DefineConstants);SUPPORTS_EPHEMERAL_KEY_SETS
-
-
-
- $(DefineConstants);SUPPORTS_CERTIFICATE_HASHING_WITH_SPECIFIED_ALGORITHM
- $(DefineConstants);SUPPORTS_STATIC_RANDOM_NUMBER_GENERATOR_METHODS
- $(DefineConstants);SUPPORTS_TIME_CONSTANT_COMPARISONS
-
-
diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddict.Validation.AspNetCore.csproj b/src/OpenIddict.Validation.AspNetCore/OpenIddict.Validation.AspNetCore.csproj
index 902e6809..6190f86e 100644
--- a/src/OpenIddict.Validation.AspNetCore/OpenIddict.Validation.AspNetCore.csproj
+++ b/src/OpenIddict.Validation.AspNetCore/OpenIddict.Validation.AspNetCore.csproj
@@ -13,16 +13,14 @@
-
+
-
+
-
-
-
-
diff --git a/src/OpenIddict.Validation.DataProtection/OpenIddict.Validation.DataProtection.csproj b/src/OpenIddict.Validation.DataProtection/OpenIddict.Validation.DataProtection.csproj
index 8efdd72b..4435b8e0 100644
--- a/src/OpenIddict.Validation.DataProtection/OpenIddict.Validation.DataProtection.csproj
+++ b/src/OpenIddict.Validation.DataProtection/OpenIddict.Validation.DataProtection.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1;netcoreapp3.1
+ net461;netcoreapp3.1;netstandard2.0;netstandard2.1
@@ -13,15 +13,13 @@
-
+
-
-
-
-
-
+
diff --git a/src/OpenIddict.Validation.Owin/OpenIddict.Validation.Owin.csproj b/src/OpenIddict.Validation.Owin/OpenIddict.Validation.Owin.csproj
index 215bde69..8d50be74 100644
--- a/src/OpenIddict.Validation.Owin/OpenIddict.Validation.Owin.csproj
+++ b/src/OpenIddict.Validation.Owin/OpenIddict.Validation.Owin.csproj
@@ -14,7 +14,6 @@
-
diff --git a/src/OpenIddict.Validation.ServerIntegration/OpenIddict.Validation.ServerIntegration.csproj b/src/OpenIddict.Validation.ServerIntegration/OpenIddict.Validation.ServerIntegration.csproj
index 3362f2f6..2328cadd 100644
--- a/src/OpenIddict.Validation.ServerIntegration/OpenIddict.Validation.ServerIntegration.csproj
+++ b/src/OpenIddict.Validation.ServerIntegration/OpenIddict.Validation.ServerIntegration.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1
+ net461;netstandard2.0;netstandard2.1
@@ -14,8 +14,4 @@
-
-
-
-
diff --git a/src/OpenIddict.Validation.SystemNetHttp/OpenIddict.Validation.SystemNetHttp.csproj b/src/OpenIddict.Validation.SystemNetHttp/OpenIddict.Validation.SystemNetHttp.csproj
index f6d13caf..90dfd21f 100644
--- a/src/OpenIddict.Validation.SystemNetHttp/OpenIddict.Validation.SystemNetHttp.csproj
+++ b/src/OpenIddict.Validation.SystemNetHttp/OpenIddict.Validation.SystemNetHttp.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1
+ net461;netstandard2.0;netstandard2.1
@@ -15,12 +15,7 @@
-
-
- $(DefineConstants);SUPPORTS_SERVICE_PROVIDER_IN_HTTP_MESSAGE_HANDLER_BUILDER
-
-
diff --git a/src/OpenIddict.Validation/OpenIddict.Validation.csproj b/src/OpenIddict.Validation/OpenIddict.Validation.csproj
index 44dea8d8..1ba4dc2c 100644
--- a/src/OpenIddict.Validation/OpenIddict.Validation.csproj
+++ b/src/OpenIddict.Validation/OpenIddict.Validation.csproj
@@ -17,13 +17,8 @@ To use the validation feature on ASP.NET Core or OWIN/Katana, reference the Open
-
-
- $(DefineConstants);SUPPORTS_EPHEMERAL_KEY_SETS
-
-
diff --git a/src/OpenIddict/OpenIddict.csproj b/src/OpenIddict/OpenIddict.csproj
index 7bf94465..206513bd 100644
--- a/src/OpenIddict/OpenIddict.csproj
+++ b/src/OpenIddict/OpenIddict.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1
+ net461;netstandard2.0;netstandard2.1
false
false
diff --git a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddict.Server.AspNetCore.IntegrationTests.csproj b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddict.Server.AspNetCore.IntegrationTests.csproj
index 6272d63d..d3c3eff0 100644
--- a/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddict.Server.AspNetCore.IntegrationTests.csproj
+++ b/test/OpenIddict.Server.AspNetCore.IntegrationTests/OpenIddict.Server.AspNetCore.IntegrationTests.csproj
@@ -21,9 +21,4 @@
-
- $(DefineConstants);SUPPORTS_GENERIC_HOST
-
-
diff --git a/test/OpenIddict.Server.IntegrationTests/OpenIddict.Server.IntegrationTests.csproj b/test/OpenIddict.Server.IntegrationTests/OpenIddict.Server.IntegrationTests.csproj
index 17c2e923..8af7c81b 100644
--- a/test/OpenIddict.Server.IntegrationTests/OpenIddict.Server.IntegrationTests.csproj
+++ b/test/OpenIddict.Server.IntegrationTests/OpenIddict.Server.IntegrationTests.csproj
@@ -25,8 +25,4 @@
-
- $(DefineConstants);SUPPORTS_ECDSA
-
-
diff --git a/test/OpenIddict.Server.Tests/OpenIddict.Server.Tests.csproj b/test/OpenIddict.Server.Tests/OpenIddict.Server.Tests.csproj
index 448e67c9..f2179c04 100644
--- a/test/OpenIddict.Server.Tests/OpenIddict.Server.Tests.csproj
+++ b/test/OpenIddict.Server.Tests/OpenIddict.Server.Tests.csproj
@@ -22,9 +22,4 @@
-
- $(DefineConstants);SUPPORTS_ECDSA
- $(DefineConstants);SUPPORTS_CERTIFICATE_GENERATION
-
-