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

ICustomAuthorizeRequestValidator ErrorDescription not bubbled up #1283

Closed
mackie1001 opened this issue Jun 27, 2017 · 3 comments
Closed

ICustomAuthorizeRequestValidator ErrorDescription not bubbled up #1283

mackie1001 opened this issue Jun 27, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@mackie1001
Copy link

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.

@brockallen
Copy link
Member

I'll look into it, thanks

@brockallen brockallen self-assigned this Jun 28, 2017
@brockallen brockallen added this to the 2.0 milestone Aug 2, 2017
@brockallen
Copy link
Member

Yes, I found where the description was not being passed along from the custom validator. I have fixed this (and added tests for it): 4889ce1

@lock
Copy link

lock bot commented Jan 14, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants