Skip to content

Commit

Permalink
Revert "Temporarily log all claims"
Browse files Browse the repository at this point in the history
  • Loading branch information
danjov authored Oct 19, 2023
1 parent f6243ba commit 1d2d0ee
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Authentication/CheckAuthorizedMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ public async Task InvokeAsync(HttpContext httpContext, ILogger<CheckAuthorizedMi
{
var errorMessage = $"The user is not authorized to use this application. Group name <{authorizedGroupName}> 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);

Expand Down

0 comments on commit 1d2d0ee

Please sign in to comment.