From bb8c85963639ba28feefd8fcf6c6a66bd47e5343 Mon Sep 17 00:00:00 2001 From: Michael Einsiedler Date: Thu, 5 Dec 2019 18:09:48 +0100 Subject: [PATCH] update packages, upgrade to netcoreapp3.1, drop support for net461 for AspNetCore --- .../TestStartup.cs | 15 ++++++++++--- ...uthentication.Basic.AspNetCore.Test.csproj | 21 ++++++++++--------- ...are.Authentication.Basic.AspNetCore.csproj | 7 +++---- ...ftaware.Authentication.Basic.Client.csproj | 2 +- .../softaware.Authentication.Basic.csproj | 2 +- .../TestStartup.cs | 17 ++++++++++++--- ...Authentication.Hmac.AspNetCore.Test.csproj | 15 ++++++------- ...ware.Authentication.Hmac.AspNetCore.csproj | 9 ++++---- ...oftaware.Authentication.Hmac.Client.csproj | 2 +- .../softaware.Authentication.Hmac.csproj | 2 +- 10 files changed, 56 insertions(+), 36 deletions(-) diff --git a/softaware.Authentication.Basic.AspNetCore.Test/TestStartup.cs b/softaware.Authentication.Basic.AspNetCore.Test/TestStartup.cs index d517f70..ca56355 100644 --- a/softaware.Authentication.Basic.AspNetCore.Test/TestStartup.cs +++ b/softaware.Authentication.Basic.AspNetCore.Test/TestStartup.cs @@ -1,13 +1,14 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; namespace softaware.Authentication.Basic.AspNetCore.Test { public class TestStartup { - public TestStartup(IHostingEnvironment env) + public TestStartup(IWebHostEnvironment env) { } @@ -20,10 +21,18 @@ public void ConfigureServices(IServiceCollection services) services.AddMvc().AddApplicationPart(typeof(TestController).Assembly); } - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime appLifetime) + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory, IHostApplicationLifetime appLifetime) { + app.UseRouting(); + app.UseAuthentication(); - app.UseMvc(); + app.UseAuthorization(); + + app.UseEndpoints(options => + { + options + .MapControllers(); + }); } } } diff --git a/softaware.Authentication.Basic.AspNetCore.Test/softaware.Authentication.Basic.AspNetCore.Test.csproj b/softaware.Authentication.Basic.AspNetCore.Test/softaware.Authentication.Basic.AspNetCore.Test.csproj index db8ec89..ce5b424 100644 --- a/softaware.Authentication.Basic.AspNetCore.Test/softaware.Authentication.Basic.AspNetCore.Test.csproj +++ b/softaware.Authentication.Basic.AspNetCore.Test/softaware.Authentication.Basic.AspNetCore.Test.csproj @@ -2,22 +2,23 @@ - netcoreapp2.1;net461 + netcoreapp3.1 false true - - - - - - - - - + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/softaware.Authentication.Basic.AspNetCore/softaware.Authentication.Basic.AspNetCore.csproj b/softaware.Authentication.Basic.AspNetCore/softaware.Authentication.Basic.AspNetCore.csproj index 9f2aeed..89fcc6d 100644 --- a/softaware.Authentication.Basic.AspNetCore/softaware.Authentication.Basic.AspNetCore.csproj +++ b/softaware.Authentication.Basic.AspNetCore/softaware.Authentication.Basic.AspNetCore.csproj @@ -1,7 +1,6 @@  - - netstandard2.0;net461 + netcoreapp3.1 1.1.0 https://github.com/softawaregmbh/library-authentication @@ -28,8 +27,8 @@ - - + + all runtime; build; native; contentfiles; analyzers diff --git a/softaware.Authentication.Basic.Client/softaware.Authentication.Basic.Client.csproj b/softaware.Authentication.Basic.Client/softaware.Authentication.Basic.Client.csproj index 0894cb2..f15b1df 100644 --- a/softaware.Authentication.Basic.Client/softaware.Authentication.Basic.Client.csproj +++ b/softaware.Authentication.Basic.Client/softaware.Authentication.Basic.Client.csproj @@ -27,7 +27,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/softaware.Authentication.Basic/softaware.Authentication.Basic.csproj b/softaware.Authentication.Basic/softaware.Authentication.Basic.csproj index 2867cd6..c8202ed 100644 --- a/softaware.Authentication.Basic/softaware.Authentication.Basic.csproj +++ b/softaware.Authentication.Basic/softaware.Authentication.Basic.csproj @@ -21,7 +21,7 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - + all runtime; build; native; contentfiles; analyzers diff --git a/softaware.Authentication.Hmac.AspNetCore.Test/TestStartup.cs b/softaware.Authentication.Hmac.AspNetCore.Test/TestStartup.cs index 4b55b77..2aa97de 100644 --- a/softaware.Authentication.Hmac.AspNetCore.Test/TestStartup.cs +++ b/softaware.Authentication.Hmac.AspNetCore.Test/TestStartup.cs @@ -1,13 +1,14 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; namespace softaware.Authentication.Hmac.AspNetCore.Test { public class TestStartup { - public TestStartup(IHostingEnvironment env) + public TestStartup(IWebHostEnvironment env) { } @@ -18,12 +19,22 @@ public void ConfigureServices(IServiceCollection services) { // Add framework services. services.AddMvc().AddApplicationPart(typeof(TestController).Assembly); + + services.AddAuthorization(); } - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime appLifetime) + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory, IHostApplicationLifetime appLifetime) { + app.UseRouting(); + app.UseAuthentication(); - app.UseMvc(); + app.UseAuthorization(); + + app.UseEndpoints(options => + { + options + .MapControllers(); + }); } } } diff --git a/softaware.Authentication.Hmac.AspNetCore.Test/softaware.Authentication.Hmac.AspNetCore.Test.csproj b/softaware.Authentication.Hmac.AspNetCore.Test/softaware.Authentication.Hmac.AspNetCore.Test.csproj index 5355099..5ce103b 100644 --- a/softaware.Authentication.Hmac.AspNetCore.Test/softaware.Authentication.Hmac.AspNetCore.Test.csproj +++ b/softaware.Authentication.Hmac.AspNetCore.Test/softaware.Authentication.Hmac.AspNetCore.Test.csproj @@ -1,19 +1,20 @@  - - netcoreapp2.1;net461 + netcoreapp3.1 false true - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/softaware.Authentication.Hmac.AspNetCore/softaware.Authentication.Hmac.AspNetCore.csproj b/softaware.Authentication.Hmac.AspNetCore/softaware.Authentication.Hmac.AspNetCore.csproj index 05c5a20..8638038 100644 --- a/softaware.Authentication.Hmac.AspNetCore/softaware.Authentication.Hmac.AspNetCore.csproj +++ b/softaware.Authentication.Hmac.AspNetCore/softaware.Authentication.Hmac.AspNetCore.csproj @@ -1,8 +1,7 @@  - - netstandard2.0;net461 + netcoreapp3.1 true softaware gmbh @@ -27,9 +26,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers diff --git a/softaware.Authentication.Hmac.Client/softaware.Authentication.Hmac.Client.csproj b/softaware.Authentication.Hmac.Client/softaware.Authentication.Hmac.Client.csproj index 27fa700..87eb1bb 100644 --- a/softaware.Authentication.Hmac.Client/softaware.Authentication.Hmac.Client.csproj +++ b/softaware.Authentication.Hmac.Client/softaware.Authentication.Hmac.Client.csproj @@ -21,7 +21,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/softaware.Authentication.Hmac/softaware.Authentication.Hmac.csproj b/softaware.Authentication.Hmac/softaware.Authentication.Hmac.csproj index ea84b3d..2e4f0fa 100644 --- a/softaware.Authentication.Hmac/softaware.Authentication.Hmac.csproj +++ b/softaware.Authentication.Hmac/softaware.Authentication.Hmac.csproj @@ -22,7 +22,7 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - + all runtime; build; native; contentfiles; analyzers