From 1d2d0ee1e45c1ab06b151b02695304efcb697099 Mon Sep 17 00:00:00 2001 From: Daniel Jovanovic Date: Thu, 19 Oct 2023 17:33:27 +0200 Subject: [PATCH] Revert "Temporarily log all claims" --- src/Authentication/CheckAuthorizedMiddleware.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Authentication/CheckAuthorizedMiddleware.cs b/src/Authentication/CheckAuthorizedMiddleware.cs index 9cbd3ed..5ddcc34 100644 --- a/src/Authentication/CheckAuthorizedMiddleware.cs +++ b/src/Authentication/CheckAuthorizedMiddleware.cs @@ -29,14 +29,6 @@ public async Task InvokeAsync(HttpContext httpContext, ILogger not found in claim <{GroupClaimType}>."; logger.LogError(errorMessage); - - // Temporarily log all claims to help with debugging. - logger.LogError("Claims:"); - foreach (var claim in httpContext.User.Claims) - { - logger.LogError($"{claim.Type}: {claim.Value}"); - } - await httpContext.Response.WriteProblemDetailsAsync( "Authorization Exception", errorMessage, StatusCodes.Status403Forbidden).ConfigureAwait(false);