diff --git a/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI.Core/SystemRegister/SystemRegisterService.cs b/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI.Core/SystemRegister/SystemRegisterService.cs index e5917f77..2966dc4f 100644 --- a/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI.Core/SystemRegister/SystemRegisterService.cs +++ b/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI.Core/SystemRegister/SystemRegisterService.cs @@ -11,9 +11,9 @@ public SystemRegisterService(ISystemRegisterClient systemRegisterClient) public async Task> GetListRegSys(CancellationToken cancellationToken) { - List lista = new(); + List lista = []; - lista = await _systemRegisterClient.GetListRegSys(); + lista = await _systemRegisterClient.GetListRegSys(cancellationToken ); return lista; } diff --git a/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Controllers/HomeController.cs b/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Controllers/HomeController.cs index 692e2a72..5eac9de7 100644 --- a/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Controllers/HomeController.cs +++ b/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Controllers/HomeController.cs @@ -11,12 +11,15 @@ namespace Altinn.Authentication.UI.Controllers; +/// +/// The Home controller +/// [Route("authfront/")] [Route("authfront/ui")] [Route("authfront/ui/{*AnyValue}")] public class HomeController : Controller { - //private readonly ILogger _logger; + private readonly ILogger _logger; private readonly IAntiforgery _antiforgery; private readonly IWebHostEnvironment _env; private readonly IHttpContextAccessor _httpContextAccessor; @@ -34,16 +37,17 @@ public class HomeController : Controller /// service implementation for user profile /// http context /// general settings + /// logger public HomeController( IUserProfileService profileService, IAntiforgery antiforgery, IWebHostEnvironment env, IHttpContextAccessor httpContextAccessor, IOptions platformSettings, - IOptions generalSettings) - //ILogger logger) + IOptions generalSettings, + ILogger logger) { - //_logger = logger; + _logger = logger; _antiforgery = antiforgery; _env = env; _httpContextAccessor = httpContextAccessor; diff --git a/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Filters/ValidateAntiforgeryTokenIfAuthCookieAuthorizationFilter.cs b/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Filters/ValidateAntiforgeryTokenIfAuthCookieAuthorizationFilter.cs index 6bbc138d..f6d9f760 100644 --- a/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Filters/ValidateAntiforgeryTokenIfAuthCookieAuthorizationFilter.cs +++ b/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Filters/ValidateAntiforgeryTokenIfAuthCookieAuthorizationFilter.cs @@ -51,7 +51,7 @@ protected virtual bool ShouldValidate(AuthorizationFilterContext context) string method = context.HttpContext.Request.Method; if ( - //string.Equals("GET", method, StringComparison.OrdinalIgnoreCase) || //Why ? + string.Equals("GET", method, StringComparison.OrdinalIgnoreCase) || //Why ? string.Equals("HEAD", method, StringComparison.OrdinalIgnoreCase) || string.Equals("TRACE", method, StringComparison.OrdinalIgnoreCase) || string.Equals("OPTIONS", method, StringComparison.OrdinalIgnoreCase)