Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
for authorization interaction OIRC error response, don't log an error…
Browse files Browse the repository at this point in the history
… to log file
  • Loading branch information
brockallen committed Mar 6, 2017
1 parent c0b13b2 commit 370a3d0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/IdentityServer4/Endpoints/AuthorizeEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ internal async Task<IEndpointResult> ProcessAuthorizeRequestAsync(NameValueColle
var interactionResult = await _interactionGenerator.ProcessInteractionAsync(request, consent);
if (interactionResult.IsError)
{
return await CreateErrorResultAsync("Interaction generator error", request, interactionResult.Error);
return await CreateErrorResultAsync("Interaction generator error", request, interactionResult.Error, logError: false);
}
if (interactionResult.IsLogin)
{
Expand Down Expand Up @@ -230,9 +230,14 @@ async Task<IEndpointResult> CreateErrorResultAsync(
string logMessage,
ValidatedAuthorizeRequest request = null,
string error = OidcConstants.AuthorizeErrors.ServerError,
string errorDescription = null)
string errorDescription = null,
bool logError = true)
{
_logger.LogError(logMessage);
if (logError)
{
_logger.LogError(logMessage);
}

if (request != null)
{
var details = new AuthorizeRequestValidationLog(request);
Expand Down

0 comments on commit 370a3d0

Please sign in to comment.