-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Before opening, please confirm:
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
Bug Category
Other
Describe the bug
Hello team, would appreciate the help in the following issues
Version: 4.2.2
-
Add public getters to
AuthorizationError
AuthorizationSuccessResponse.getErrors() exposesAuthorizationError, but it lacks public accessors.
Could you please provide some getters so we can accessAuthorizationErrorfields? We use them for logging/debugging and mapping the errors to internal representations.
Note: getErrors() returned strings in the 3.x versions and we used them for logging, so this represents a regression given that we are losing debugability without the accessors in the newest version. -
Override
toStringinAuthorizationError
AuthorizationSuccessResponse.toString() referencesdiagnostics.errors, but given thatAuthorizationErrordoesn't overridetoString, it returns the memory reference instead of the string representation.
Expected behavior
- Being able to access
policyIdanderrorwithinAuthorizationError - Return String representation of
diagnostics.errors
Reproduction steps
- Tried to access fields within any
AuthorizationErrorinstance - Example code and string resulted:
final Diagnostics diagnostics = new Diagnostics(new HashSet<>(reasons), List.of(new AuthorizationError("policy", new DetailedError("message", Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()))));
final AuthorizationSuccessResponse authorizationSuccessResponse = new AuthorizationSuccessResponse(decision, diagnostics);
final String authString = authorizationSuccessResponse.toString();
Code Snippet
// Put your code below this line.Log output
// Put your output below this line
Additional configuration
No response
Operating System
MacOS
Additional information and screenshots
No response