From 66367847544aecc66d15fde687aa0db0ce1750eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Tue, 14 Nov 2023 15:35:18 +0100 Subject: [PATCH] Add a .NET 8.0 TFM --- Directory.Build.props | 7 ++- Directory.Build.targets | 6 +++ Directory.Packages.props | 54 +++++++++++++++++-- NuGet.config | 15 ++++++ ...penIddict.Sandbox.AspNetCore.Client.csproj | 2 +- ...penIddict.Sandbox.AspNetCore.Server.csproj | 2 +- .../OpenIddict.Sandbox.Console.Client.csproj | 2 +- .../OpenIddict.Sandbox.WinForms.Client.csproj | 2 +- .../OpenIddict.Sandbox.Wpf.Client.csproj | 2 +- .../OpenIddict.AspNetCore.csproj | 1 + .../OpenIddictClientAspNetCoreHandler.cs | 14 +++++ .../OpenIddictServerAspNetCoreHandler.cs | 14 +++++ .../OpenIddictValidationAspNetCoreHandler.cs | 14 +++++ src/OpenIddict/OpenIddict.csproj | 3 ++ 14 files changed, 126 insertions(+), 12 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 73b144cad..d688f7fd7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -43,13 +43,16 @@ net6.0; - net7.0 + net7.0; + net8.0 net6.0-windows7.0; net6.0-windows10.0.17763; net7.0-windows7.0; - net7.0-windows10.0.17763 + net7.0-windows10.0.17763; + net8.0-windows7.0; + net8.0-windows10.0.17763 netstandard2.0; diff --git a/Directory.Build.targets b/Directory.Build.targets index 692ac5abc..1ff00b31e 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -109,6 +109,12 @@ $(DefineConstants);SUPPORTS_AUTHENTICATION_HANDLER_SELECTION_FALLBACK + + $(DefineConstants);SUPPORTS_IMMUTABLE_COLLECTIONS_MARSHAL + $(DefineConstants);SUPPORTS_TIME_PROVIDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + diff --git a/NuGet.config b/NuGet.config index 998a17276..71a9c6b9f 100644 --- a/NuGet.config +++ b/NuGet.config @@ -5,6 +5,9 @@ + + + @@ -19,6 +22,18 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj b/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj index e0271a38c..e8b91d393 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false disable diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj index e52acc109..eefd3c7eb 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false false false diff --git a/sandbox/OpenIddict.Sandbox.Console.Client/OpenIddict.Sandbox.Console.Client.csproj b/sandbox/OpenIddict.Sandbox.Console.Client/OpenIddict.Sandbox.Console.Client.csproj index caf51e3bb..d00328f74 100644 --- a/sandbox/OpenIddict.Sandbox.Console.Client/OpenIddict.Sandbox.Console.Client.csproj +++ b/sandbox/OpenIddict.Sandbox.Console.Client/OpenIddict.Sandbox.Console.Client.csproj @@ -2,7 +2,7 @@ Exe - net48;net7.0 + net48;net8.0 true false false diff --git a/sandbox/OpenIddict.Sandbox.WinForms.Client/OpenIddict.Sandbox.WinForms.Client.csproj b/sandbox/OpenIddict.Sandbox.WinForms.Client/OpenIddict.Sandbox.WinForms.Client.csproj index caac4ade1..84890b02d 100644 --- a/sandbox/OpenIddict.Sandbox.WinForms.Client/OpenIddict.Sandbox.WinForms.Client.csproj +++ b/sandbox/OpenIddict.Sandbox.WinForms.Client/OpenIddict.Sandbox.WinForms.Client.csproj @@ -2,7 +2,7 @@ WinExe - net48;net7.0-windows7.0 + net48;net8.0-windows7.0 true true true diff --git a/sandbox/OpenIddict.Sandbox.Wpf.Client/OpenIddict.Sandbox.Wpf.Client.csproj b/sandbox/OpenIddict.Sandbox.Wpf.Client/OpenIddict.Sandbox.Wpf.Client.csproj index 47aa92573..1b606c7ae 100644 --- a/sandbox/OpenIddict.Sandbox.Wpf.Client/OpenIddict.Sandbox.Wpf.Client.csproj +++ b/sandbox/OpenIddict.Sandbox.Wpf.Client/OpenIddict.Sandbox.Wpf.Client.csproj @@ -2,7 +2,7 @@ WinExe - net48;net7.0-windows10.0.17763 + net48;net8.0-windows10.0.17763 true true true diff --git a/src/OpenIddict.AspNetCore/OpenIddict.AspNetCore.csproj b/src/OpenIddict.AspNetCore/OpenIddict.AspNetCore.csproj index 93afebc0e..857a6de16 100644 --- a/src/OpenIddict.AspNetCore/OpenIddict.AspNetCore.csproj +++ b/src/OpenIddict.AspNetCore/OpenIddict.AspNetCore.csproj @@ -28,6 +28,7 @@ + diff --git a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandler.cs b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandler.cs index 3aa889100..5614bcef0 100644 --- a/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandler.cs +++ b/src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHandler.cs @@ -30,6 +30,19 @@ public sealed class OpenIddictClientAspNetCoreHandler : AuthenticationHandler /// Creates a new instance of the class. /// +#if SUPPORTS_TIME_PROVIDER + public OpenIddictClientAspNetCoreHandler( + IOpenIddictClientDispatcher dispatcher, + IOpenIddictClientFactory factory, + IOptionsMonitor options, + ILoggerFactory logger, + UrlEncoder encoder) + : base(options, logger, encoder) + { + _dispatcher = dispatcher ?? throw new ArgumentNullException(nameof(dispatcher)); + _factory = factory ?? throw new ArgumentNullException(nameof(factory)); + } +#else public OpenIddictClientAspNetCoreHandler( IOpenIddictClientDispatcher dispatcher, IOpenIddictClientFactory factory, @@ -42,6 +55,7 @@ public OpenIddictClientAspNetCoreHandler( _dispatcher = dispatcher ?? throw new ArgumentNullException(nameof(dispatcher)); _factory = factory ?? throw new ArgumentNullException(nameof(factory)); } +#endif /// public async Task HandleRequestAsync() diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs index 10bc310e6..d6fae3627 100644 --- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs +++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHandler.cs @@ -30,6 +30,19 @@ public sealed class OpenIddictServerAspNetCoreHandler : AuthenticationHandler /// Creates a new instance of the class. /// +#if SUPPORTS_TIME_PROVIDER + public OpenIddictServerAspNetCoreHandler( + IOpenIddictServerDispatcher dispatcher, + IOpenIddictServerFactory factory, + IOptionsMonitor options, + ILoggerFactory logger, + UrlEncoder encoder) + : base(options, logger, encoder) + { + _dispatcher = dispatcher ?? throw new ArgumentNullException(nameof(dispatcher)); + _factory = factory ?? throw new ArgumentNullException(nameof(factory)); + } +#else public OpenIddictServerAspNetCoreHandler( IOpenIddictServerDispatcher dispatcher, IOpenIddictServerFactory factory, @@ -42,6 +55,7 @@ public OpenIddictServerAspNetCoreHandler( _dispatcher = dispatcher ?? throw new ArgumentNullException(nameof(dispatcher)); _factory = factory ?? throw new ArgumentNullException(nameof(factory)); } +#endif /// public async Task HandleRequestAsync() diff --git a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs index 5f7949b96..0e68dee49 100644 --- a/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs +++ b/src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHandler.cs @@ -27,6 +27,19 @@ public sealed class OpenIddictValidationAspNetCoreHandler : AuthenticationHandle /// /// Creates a new instance of the class. /// +#if SUPPORTS_TIME_PROVIDER + public OpenIddictValidationAspNetCoreHandler( + IOpenIddictValidationDispatcher dispatcher, + IOpenIddictValidationFactory factory, + IOptionsMonitor options, + ILoggerFactory logger, + UrlEncoder encoder) + : base(options, logger, encoder) + { + _dispatcher = dispatcher ?? throw new ArgumentNullException(nameof(dispatcher)); + _factory = factory ?? throw new ArgumentNullException(nameof(factory)); + } +#else public OpenIddictValidationAspNetCoreHandler( IOpenIddictValidationDispatcher dispatcher, IOpenIddictValidationFactory factory, @@ -39,6 +52,7 @@ public OpenIddictValidationAspNetCoreHandler( _dispatcher = dispatcher ?? throw new ArgumentNullException(nameof(dispatcher)); _factory = factory ?? throw new ArgumentNullException(nameof(factory)); } +#endif /// public async Task HandleRequestAsync() diff --git a/src/OpenIddict/OpenIddict.csproj b/src/OpenIddict/OpenIddict.csproj index 28ca0b5a0..482fb782b 100644 --- a/src/OpenIddict/OpenIddict.csproj +++ b/src/OpenIddict/OpenIddict.csproj @@ -43,6 +43,9 @@ To use these features on ASP.NET Core or OWIN/Katana/ASP.NET 4.x, reference the + + +