Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

ErrorDescription isn't returned in response from ICustomGrantValidator #2971

Closed
ebartkus opened this issue Jun 8, 2016 · 1 comment
Closed
Assignees
Milestone

Comments

@ebartkus
Copy link

ebartkus commented Jun 8, 2016

Issue

Hi,

I'm implementing ICustomGrantValidator.

In case of errors I return something like:

grantValidationResult = new CustomGrantValidationResult
                    {
                        IsError = true,
                        Error = Constants.TokenErrors.InvalidRequest,
                        ErrorDescription = "Unsupported subject_token_type."
                    };

Trouble is ErrorDescription never gets returned as part of token endpoint response.
I tracked it down to this line in TokenRequestValidator.cs.
Fixing it should be trivial:

// From
return Invalid(result.Error);
// To
return Invalid(result.Error, result.ErrorDescription);

Assuming there are no security considerations I'm not aware of can we get it fixed?
It would really make life easier for our internal developers getting more information than "InvalidRequest".

Should I make PR for this?

@leastprivilege
Copy link
Member

thanks - added it to the 2.5.1 milestone

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants