Authorize with anonymous principal if principal name is null#1050
Conversation
|
@agileknight Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@agileknight Thank you for signing the Contributor License Agreement! |
OlgaMaciaszek
left a comment
There was a problem hiding this comment.
Hi @agileknight. Thanks for submitting the PR. In general, looks good. Please add your name with @author tag to the javadocs of all the files you've modified. Please update the date in the license comment in the files you've modified to 2015-2024.
Also, please submit this PR against 4.1.x instead, so that it also gets included in the 2023.0.x release train.
OlgaMaciaszek
left a comment
There was a problem hiding this comment.
Some build tests are failing. Please take a look.
751040d to
8304aec
Compare
The authorizedClientManager.authorize method requires a non-null principal name or it will usually throw an exception in practice like "principalName cannot be empty". Using the anonymous principal in this case like for a null principal handles the situation more gracefully. Fixes spring-cloud#1049
8304aec to
ab8d462
Compare
OlgaMaciaszek
left a comment
There was a problem hiding this comment.
Thanks, @agileknight. LGTM.
The authorizedClientManager.authorize method requires a non-null principal name or it will usually throw an exception in practice like "principalName cannot be empty".
Using the anonymous principal in this case like for a null principal handles the situation more gracefully.
Fixes #1049