Expose error response json in case extra parameters are given.
Checklist
- [x] I read the Contribution Guidelines
- [x] I signed the CLA and WG Agreements
- [x] I ran, updated and added unit tests as necessary.
- [x] I verified the contribution matches existing coding style.
- [x] 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.
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
Project coverage is 82.93%. Comparing base (
5966cc7) to head (496fbb6). Report is 7 commits behind head on master.
| Files | Patch % | Lines |
|---|---|---|
| .../java/net/openid/appauth/AuthorizationService.java | 50.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #885 +/- ##
=========================================
Coverage 82.92% 82.93%
Complexity 532 532
=========================================
Files 46 46
Lines 2642 2643 +1
Branches 264 264
=========================================
+ Hits 2191 2192 +1
Misses 351 351
Partials 100 100
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Very interested in this as well.
In this case, due to a Keycloak custom Authenticator returning additional non-standard fields for some error cases, which there is no way to access with the current implementation of AuthorizationException.