Skip to content

Commit

Permalink
Restores default output in MinimalPermissionsGuidancePlugin. Closes #770
Browse files Browse the repository at this point in the history
 (#771)
  • Loading branch information
waldekmastykarz authored Jun 10, 2024
1 parent fa465d4 commit 82811c7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dev-proxy-plugins/RequestLogs/MinimalPermissionsGuidancePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,18 @@ private async Task EvaluateMinimalScopes(IEnumerable<(string method, string url)

permissionsInfo.MinimalPermissions = minimalPermissions;
permissionsInfo.ExcessPermissions = excessPermissions;

Logger.LogInformation("Minimal permissions: {minimalPermissions}", string.Join(", ", minimalPermissions));
Logger.LogInformation("Permissions on the token: {tokenPermissions}", string.Join(", ", permissionsFromAccessToken));

if (excessPermissions.Any())
{
Logger.LogWarning("The following permissions are unnecessary: {permissions}", string.Join(", ", excessPermissions));
}
else
{
Logger.LogInformation("The token has the minimal permissions required.");
}
}
if (errors.Any())
{
Expand Down

0 comments on commit 82811c7

Please sign in to comment.