diff --git a/backend/API/Middlewares/JwtMiddleware.cs b/backend/API/Middlewares/JwtMiddleware.cs index 01de0ce..a82efd0 100644 --- a/backend/API/Middlewares/JwtMiddleware.cs +++ b/backend/API/Middlewares/JwtMiddleware.cs @@ -8,11 +8,13 @@ public class JwtMiddleware { private readonly IJwtService _jwtService; private readonly RequestDelegate _next; + private readonly ILogger _logger; - public JwtMiddleware(RequestDelegate next, IJwtService jwtService) + public JwtMiddleware(RequestDelegate next, IJwtService jwtService, ILogger logger) { _next = next; _jwtService = jwtService; + _logger = logger; } public async Task Invoke(HttpContext context) @@ -32,7 +34,8 @@ public class JwtMiddleware } else { - var token = context.Request.Headers["Authorization"].FirstOrDefault()?.Split(" ").Last(); + var token = context.Request.Headers.Authorization.FirstOrDefault()?.Split(" ").Last(); + _logger.LogInformation(token); if (token != null && _jwtService.ValidateJwtToken(token)) { await _next(context); diff --git a/backend/API/Program.cs b/backend/API/Program.cs index 0a9dbb7..89f523a 100644 --- a/backend/API/Program.cs +++ b/backend/API/Program.cs @@ -9,6 +9,11 @@ using Microsoft.AspNetCore.Server.Kestrel.Https; var builder = WebApplication.CreateBuilder(args); +builder.Logging.ClearProviders(); +builder.Logging.AddConsole(); +builder.Logging.AddDebug(); + + // Specify the paths to your certificate and key files var certPath = Path.Combine(Directory.GetCurrentDirectory(), "cert.pem"); var keyPath = Path.Combine(Directory.GetCurrentDirectory(), "key.pem"); diff --git a/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs b/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs index dcd1aeb..40abd94 100644 --- a/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs +++ b/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("API")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e57b47cae362bcdd292021d92f19844516cd42b7")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8e4322649e4df45cec652c7098c929f725ff16bf")] [assembly: System.Reflection.AssemblyProductAttribute("API")] [assembly: System.Reflection.AssemblyTitleAttribute("API")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache b/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache index de7b4fe..d2b6a89 100644 --- a/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache +++ b/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache @@ -1 +1 @@ -9dc91fd589f405d9b89d7ec2470007cfa5e9ff60c37dde9d153100048a5640aa +453ffda4295c5e0dce92614f7a406e66ffae57500f6c15603961c11cf348a009 diff --git a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs index 7631959..ddacefe 100644 --- a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs +++ b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Application")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e57b47cae362bcdd292021d92f19844516cd42b7")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8e4322649e4df45cec652c7098c929f725ff16bf")] [assembly: System.Reflection.AssemblyProductAttribute("Application")] [assembly: System.Reflection.AssemblyTitleAttribute("Application")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache index 99f26a4..7296c34 100644 --- a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache +++ b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache @@ -1 +1 @@ -bfe10c0d99ed763107935cd49c0577dc27e483b0ca9df238669535f4476770d5 +6ca174afc35f5fdcc8715c5bb376cc554f09ba16eda6d67b7df7a3c0e062c344 diff --git a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs index 6b92a14..4528dd6 100644 --- a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs +++ b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Core")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e57b47cae362bcdd292021d92f19844516cd42b7")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8e4322649e4df45cec652c7098c929f725ff16bf")] [assembly: System.Reflection.AssemblyProductAttribute("Core")] [assembly: System.Reflection.AssemblyTitleAttribute("Core")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache index 9343e08..450ab5c 100644 --- a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache +++ b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache @@ -1 +1 @@ -1731d862758ef82cd7c513bcb38bff73a1b5beb084a39b696fc298cd610107a4 +06e566e120d8488e3dfc95d85e6805370c781d6c203b86c1b46ed0b55079aa4f diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs index 2f8bb6e..ad3a984 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e57b47cae362bcdd292021d92f19844516cd42b7")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8e4322649e4df45cec652c7098c929f725ff16bf")] [assembly: System.Reflection.AssemblyProductAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyTitleAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache index c9d5a61..069251d 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache @@ -1 +1 @@ -96f120a4c90b24741ae606108bd0d57fcdbef6caac17c6380670528a15f69c56 +01fdf999d8e59aa323bab4cc85ea8512cc4d311b21dd98f5a7d79aa4a2c0dbd7