|
|
|
@ -234,7 +234,8 @@ namespace OpenIddict |
|
|
|
var token = await tokens.FindByIdAsync(identifier, context.HttpContext.RequestAborted); |
|
|
|
if (token == null) |
|
|
|
{ |
|
|
|
logger.LogError("The token request was rejected because the authorization code was no longer valid."); |
|
|
|
logger.LogError("The token request was rejected because the authorization " + |
|
|
|
"code '{Identifier}' was not found in the database.", identifier); |
|
|
|
|
|
|
|
context.Reject( |
|
|
|
error: OpenIdConnectConstants.Errors.InvalidGrant, |
|
|
|
@ -269,7 +270,8 @@ namespace OpenIddict |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
logger.LogError("The token request was rejected because the authorization code was already redeemed."); |
|
|
|
logger.LogError("The token request was rejected because the authorization code " + |
|
|
|
"'{Identifier}' has already been redeemed.", identifier); |
|
|
|
|
|
|
|
context.Reject( |
|
|
|
error: OpenIdConnectConstants.Errors.InvalidGrant, |
|
|
|
@ -280,7 +282,8 @@ namespace OpenIddict |
|
|
|
|
|
|
|
else if (!await tokens.IsValidAsync(token, context.HttpContext.RequestAborted)) |
|
|
|
{ |
|
|
|
logger.LogError("The token request was rejected because the authorization code was no longer valid."); |
|
|
|
logger.LogError("The token request was rejected because the authorization code " + |
|
|
|
"'{Identifier}' was no longer valid.", identifier); |
|
|
|
|
|
|
|
context.Reject( |
|
|
|
error: OpenIdConnectConstants.Errors.InvalidGrant, |
|
|
|
@ -299,7 +302,8 @@ namespace OpenIddict |
|
|
|
var token = await tokens.FindByIdAsync(identifier, context.HttpContext.RequestAborted); |
|
|
|
if (token == null) |
|
|
|
{ |
|
|
|
logger.LogError("The token request was rejected because the refresh token was already redeemed."); |
|
|
|
logger.LogError("The token request was rejected because the refresh token " + |
|
|
|
"'{Identifier}' was not found in the database.", identifier); |
|
|
|
|
|
|
|
context.Reject( |
|
|
|
error: OpenIdConnectConstants.Errors.InvalidGrant, |
|
|
|
@ -310,7 +314,8 @@ namespace OpenIddict |
|
|
|
|
|
|
|
else if (await tokens.IsRedeemedAsync(token, context.HttpContext.RequestAborted)) |
|
|
|
{ |
|
|
|
logger.LogError("The token request was rejected because the refresh token was no longer valid."); |
|
|
|
logger.LogError("The token request was rejected because the refresh token " + |
|
|
|
"'{Identifier}' has already been redeemed.", identifier); |
|
|
|
|
|
|
|
context.Reject( |
|
|
|
error: OpenIdConnectConstants.Errors.InvalidGrant, |
|
|
|
@ -321,7 +326,8 @@ namespace OpenIddict |
|
|
|
|
|
|
|
else if (!await tokens.IsValidAsync(token, context.HttpContext.RequestAborted)) |
|
|
|
{ |
|
|
|
logger.LogError("The token request was rejected because the refresh token was no longer valid."); |
|
|
|
logger.LogError("The token request was rejected because the refresh token " + |
|
|
|
"'{Identifier}' was no longer valid.", identifier); |
|
|
|
|
|
|
|
context.Reject( |
|
|
|
error: OpenIdConnectConstants.Errors.InvalidGrant, |
|
|
|
|