Skip to content

Commit

Permalink
Merge pull request #321 from GeoWerkstatt/revert-320-log-claims
Browse files Browse the repository at this point in the history
Revert "Temporarily log all claims"
  • Loading branch information
danjov authored Oct 19, 2023
2 parents f6243ba + 1d2d0ee commit cdf26cb
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 cdf26cb

Please sign in to comment.