You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
I have a requirement to perform additional validation on authorize endpoint requests to enforce a policy around 2FA use. As part of this I need to present a friendly message to the end user. ICustomAuthorizeRequestValidator is great and allows me to do exactly what I want, including specifying an ErrorDescription in the returned result. However when this reaches AuthorizeResult.RedirectToErrorPageAsync() it does not pass/persist the ErrorDescription property.
Could I possibly request that you add support for this to IdentityServer4.Models.ErrorMessage and IdentityServer4.Endpoints.Results.AuthorizeResult please?
The text was updated successfully, but these errors were encountered:
This appears to still be an issue. If I set AuthorizeRequestValidationResult.ErrorDescription in my ICustomAuthorizeRequestValidator even the TokenIssuedFailureEvent raised immediately after the call to ValidateAsync() does not include the description. It does not get picked up when I call IIdentityServerInteractionService.GetErrorContextAsync() either.
It looks like this is the culprit in AuthorizeRequestValidator:
if (customResult.IsError)
{
LogError("Error in custom validation: " + customResult.Error, request);
return Invalid(request, customResult.Error);
}
The call to Invalid() is not passing the ErrorDescription from customResult.
Unfortunately that class and its interface are internal so I'm not able to replace it with my own implementation.
I have a requirement to perform additional validation on authorize endpoint requests to enforce a policy around 2FA use. As part of this I need to present a friendly message to the end user. ICustomAuthorizeRequestValidator is great and allows me to do exactly what I want, including specifying an ErrorDescription in the returned result. However when this reaches AuthorizeResult.RedirectToErrorPageAsync() it does not pass/persist the ErrorDescription property.
Could I possibly request that you add support for this to IdentityServer4.Models.ErrorMessage and IdentityServer4.Endpoints.Results.AuthorizeResult please?
The text was updated successfully, but these errors were encountered: