Identityserver4: ICustomAuthorizeRequestValidator ErrorDescription not bubbled up

Created on 27 Jun 2017  路  3Comments  路  Source: IdentityServer/IdentityServer4

This is related to Issue 965 on which I have commented the same.

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.

bug

Most helpful comment

Yes, I found where the description was not being passed along from the custom validator. I have fixed this (and added tests for it): https://github.com/IdentityServer/IdentityServer4/commit/4889ce18106aadd3b8f3e2cf8b20aeb70d958d38

All 3 comments

I'll look into it, thanks

Yes, I found where the description was not being passed along from the custom validator. I have fixed this (and added tests for it): https://github.com/IdentityServer/IdentityServer4/commit/4889ce18106aadd3b8f3e2cf8b20aeb70d958d38

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings