Expose error response json in case extra parameters are given. by doreaimon · Pull Request #885 · openid/AppAuth-Android
Checklist
- I read the Contribution Guidelines
- I signed the CLA and WG Agreements
- I ran, updated and added unit tests as necessary.
- I verified the contribution matches existing coding style.
- I updated the documentation if necessary.
Motivation and Context
We have found that some servers will return non-standard parameters along with the standard ones in their error responses, and we see a need for getting access to those parameters. To facilitate this, we would like to pass back the full original error response JSONObject along in the token request callback in the AuthorizationException.
Description
We held onto the original error response JSONObject and added it as an optional field in the AuthorizationException that is passed to the token request callback.