From 359dc5dad13e58372db30f977432b51a6cf891d0 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 4 Feb 2023 11:14:21 +0200 Subject: [PATCH] Tuitio packages update --- Directory.Build.props | 2 +- ReleaseNotes.xml | 12 ++++++++++-- dependencies.props | 4 ++-- .../Extensions/StartupExtensions.cs | 6 +++--- .../NetworkResurrector.Agent.csproj | 2 +- src/agent/NetworkResurrector.Agent/appsettings.json | 2 +- .../Controllers/SystemController.cs | 2 +- .../Extensions/StartupExtensions.cs | 6 +++--- .../NetworkResurrector.Api.csproj | 2 +- .../NetworkResurrector.Api/Services/UserService.cs | 2 +- src/api/NetworkResurrector.Api/appsettings.json | 2 +- .../Extensions/StartupExtensions.cs | 8 +++----- .../NetworkResurrector.Server.csproj | 2 +- .../NetworkResurrector.Server/appsettings.json | 2 +- 14 files changed, 30 insertions(+), 24 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 5603ed4..27de43a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 1.1.1 + 1.1.2 Tudor Stanciu STA NetworkResurrector diff --git a/ReleaseNotes.xml b/ReleaseNotes.xml index f78c255..b0f5b6e 100644 --- a/ReleaseNotes.xml +++ b/ReleaseNotes.xml @@ -17,7 +17,7 @@ 1.0.2 Replaced Swagger and MediatR implementations with inhouse nuget packages. - Integration with local Identity Server. + Integration with Tuitio. @@ -50,7 +50,7 @@ • Added README.md file - + 1.1.1 Retouches after the last upgrade @@ -58,4 +58,12 @@ • Small fixes + + 1.1.2 + + Tuitio latest updates + • Tuitio nuget packages upgrade + • Tuitio configuration changes + + \ No newline at end of file diff --git a/dependencies.props b/dependencies.props index 0eba076..4ee6a44 100644 --- a/dependencies.props +++ b/dependencies.props @@ -10,8 +10,8 @@ 9.0.0 6.0.30 6.0.1 - 1.0.6 - 1.0.8 + 1.0.7 + 2.0.0 1.2.0 1.0.1 diff --git a/src/agent/NetworkResurrector.Agent/Extensions/StartupExtensions.cs b/src/agent/NetworkResurrector.Agent/Extensions/StartupExtensions.cs index eadcc30..9d4c0ee 100644 --- a/src/agent/NetworkResurrector.Agent/Extensions/StartupExtensions.cs +++ b/src/agent/NetworkResurrector.Agent/Extensions/StartupExtensions.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Netmash.Extensions.Swagger; using Netmash.Extensions.Swagger.Constants; -using Netmash.Security.Authentication.Identity; +using Netmash.Security.Authentication.Tuitio; using NetworkResurrector.Agent.Application; using System.Reflection; @@ -18,7 +18,7 @@ namespace NetworkResurrector.Agent.Extensions services.AddControllers(); // Add basic authentication - services.AddIdentityAuthentication(configuration.GetSection("IdentityServer")["BaseAddress"]); + services.AddTuitioAuthentication(configuration.GetSection("Tuitio")["BaseAddress"]); // MediatR services.AddMediatR(GetMediatRAssemblies()); @@ -30,7 +30,7 @@ namespace NetworkResurrector.Agent.Extensions // Swagger var agentCode = configuration.GetValue("Agent:Code"); - services.AddSwagger($"NetworkResurrectorAgent {agentCode}", AuthorizationType.InhouseIdentity); + services.AddSwagger($"NetworkResurrectorAgent {agentCode}", AuthorizationType.Tuitio); // Data access // services.AddDataAccess(); diff --git a/src/agent/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj b/src/agent/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj index 16ef05e..384e3c3 100644 --- a/src/agent/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj +++ b/src/agent/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/agent/NetworkResurrector.Agent/appsettings.json b/src/agent/NetworkResurrector.Agent/appsettings.json index 6aef3d7..1e21b11 100644 --- a/src/agent/NetworkResurrector.Agent/appsettings.json +++ b/src/agent/NetworkResurrector.Agent/appsettings.json @@ -26,7 +26,7 @@ "Agent": { "Code": "DEV_AGENT" }, - "IdentityServer": { + "Tuitio": { "BaseAddress": "http://:/api/" }, "Restrictions": { diff --git a/src/api/NetworkResurrector.Api/Controllers/SystemController.cs b/src/api/NetworkResurrector.Api/Controllers/SystemController.cs index 6cc023f..f5a0113 100644 --- a/src/api/NetworkResurrector.Api/Controllers/SystemController.cs +++ b/src/api/NetworkResurrector.Api/Controllers/SystemController.cs @@ -5,7 +5,7 @@ using NetworkResurrector.Api.Application.Queries; using System; using System.Threading.Tasks; -namespace IdentityServer.Api.Controllers +namespace NetworkResurrector.Api.Controllers { [Authorize] [ApiController] diff --git a/src/api/NetworkResurrector.Api/Extensions/StartupExtensions.cs b/src/api/NetworkResurrector.Api/Extensions/StartupExtensions.cs index b464889..270b672 100644 --- a/src/api/NetworkResurrector.Api/Extensions/StartupExtensions.cs +++ b/src/api/NetworkResurrector.Api/Extensions/StartupExtensions.cs @@ -7,7 +7,7 @@ using Netmash.Extensions.Swagger; using Netmash.Extensions.Swagger.Constants; using Netmash.Infrastructure.DatabaseMigration; using Netmash.Infrastructure.DatabaseMigration.Constants; -using Netmash.Security.Authentication.Identity; +using Netmash.Security.Authentication.Tuitio; using NetworkResurrector.Agent.Wrapper; using NetworkResurrector.Api.Application; using NetworkResurrector.Api.Domain.Abstractions; @@ -26,7 +26,7 @@ namespace NetworkResurrector.Api.Extensions .AddNewtonsoftJson(o => o.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Utc); // Add basic authentication - services.AddIdentityAuthentication(configuration.GetSection("IdentityServer")["BaseAddress"]); + services.AddTuitioAuthentication(configuration.GetSection("Tuitio")["BaseAddress"]); services.AddHttpContextAccessor(); services.AddScoped(); @@ -40,7 +40,7 @@ namespace NetworkResurrector.Api.Extensions services.AddAutoMapper(typeof(Application.Mappings.MappingProfile).Assembly); // Swagger - services.AddSwagger("NetworkResurrector API", AuthorizationType.InhouseIdentity); + services.AddSwagger("NetworkResurrector API", AuthorizationType.Tuitio); // Add network resurrector server services services.UseResurrectorServices(configuration.GetSection("NetworkResurrectorServer")["BaseAddress"]); diff --git a/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj b/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj index 283867a..19f03af 100644 --- a/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj +++ b/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj @@ -14,7 +14,7 @@ - + diff --git a/src/api/NetworkResurrector.Api/Services/UserService.cs b/src/api/NetworkResurrector.Api/Services/UserService.cs index 66cc1d9..b573afe 100644 --- a/src/api/NetworkResurrector.Api/Services/UserService.cs +++ b/src/api/NetworkResurrector.Api/Services/UserService.cs @@ -39,7 +39,7 @@ namespace NetworkResurrector.Api.Services public bool UserIsGuest() { - var userIsGuest = _httpAccessor.HttpContext.User?.Claims.FirstOrDefault(z => z.Type == Netmash.Security.Authentication.Identity.Constants.ClaimTypes.IsGuestUser)?.Value; + var userIsGuest = _httpAccessor.HttpContext.User?.Claims.FirstOrDefault(z => z.Type == Netmash.Security.Authentication.Tuitio.Constants.ClaimTypes.IsGuestUser)?.Value; return !string.IsNullOrEmpty(userIsGuest) && bool.TrueString == userIsGuest; } } diff --git a/src/api/NetworkResurrector.Api/appsettings.json b/src/api/NetworkResurrector.Api/appsettings.json index 5684794..546d26a 100644 --- a/src/api/NetworkResurrector.Api/appsettings.json +++ b/src/api/NetworkResurrector.Api/appsettings.json @@ -26,7 +26,7 @@ "Service": { "Code": "NETWORK_RESURRECTOR_API" }, - "IdentityServer": { + "Tuitio": { "BaseAddress": "http://:/api/" }, "NetworkResurrectorServer": { diff --git a/src/server/NetworkResurrector.Server/Extensions/StartupExtensions.cs b/src/server/NetworkResurrector.Server/Extensions/StartupExtensions.cs index 85c6e44..9ec81d6 100644 --- a/src/server/NetworkResurrector.Server/Extensions/StartupExtensions.cs +++ b/src/server/NetworkResurrector.Server/Extensions/StartupExtensions.cs @@ -1,13 +1,11 @@ using MediatR; using MediatR.Pipeline; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; using Netmash.Extensions.Swagger; using Netmash.Extensions.Swagger.Constants; -using Netmash.Security.Authentication.Identity; +using Netmash.Security.Authentication.Tuitio; using NetworkResurrector.Server.Application; using Newtonsoft.Json; using System.Reflection; @@ -22,7 +20,7 @@ namespace NetworkResurrector.Server.Extensions .AddNewtonsoftJson(o => o.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Utc); // Add basic authentication - services.AddIdentityAuthentication(configuration.GetSection("IdentityServer")["BaseAddress"]); + services.AddTuitioAuthentication(configuration.GetSection("Tuitio")["BaseAddress"]); services.AddHttpContextAccessor(); @@ -36,7 +34,7 @@ namespace NetworkResurrector.Server.Extensions typeof(Application.Mappings.MappingProfile).Assembly); // Swagger - services.AddSwagger("NetworkResurrector Server API", AuthorizationType.InhouseIdentity); + services.AddSwagger("NetworkResurrector Server API", AuthorizationType.Tuitio); // Application services.AddApplicationServices(); diff --git a/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj b/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj index 169de81..9ce661f 100644 --- a/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj +++ b/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/server/NetworkResurrector.Server/appsettings.json b/src/server/NetworkResurrector.Server/appsettings.json index 4868032..d4c284c 100644 --- a/src/server/NetworkResurrector.Server/appsettings.json +++ b/src/server/NetworkResurrector.Server/appsettings.json @@ -23,7 +23,7 @@ } }, "AllowedHosts": "*", - "IdentityServer": { + "Tuitio": { "BaseAddress": "http://:/api/" }, "WakeOnLan": {