Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SpEL Returning AuthorizationDecision #14840

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

jzheaux
Copy link
Contributor

@jzheaux jzheaux commented Apr 4, 2024

Closes gh-14599

WIth this PR, an application can return an AuthorizationDecision from a SpEL expression.

Note that the MethodAuthorizationDeniedHandler and MethodAuthorizationResultPostProcessor object hierarchies were modified to ensure that any custom type that is returned from a SpEL expression is preserved. No authorization decision wrapping is performed any longer in this case.

This is also valuable for being able to use custom handling and post-processing in the event that the expression throws an exception.

Copy link
Contributor

@marcusdacoregio marcusdacoregio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jzheaux. I've left some feedback inline.

@jzheaux jzheaux marked this pull request as ready for review April 4, 2024 15:43
@jzheaux jzheaux self-assigned this Apr 4, 2024
@jzheaux jzheaux added type: enhancement A general enhancement Epic labels Apr 4, 2024
@jzheaux jzheaux added this to the 6.3.0-RC1 milestone Apr 4, 2024
@jzheaux jzheaux merged commit 77f2977 into spring-projects:main Apr 4, 2024
3 checks passed
@jzheaux jzheaux deleted the gh-14599 branch April 4, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Converter for SpEL return types to AuthorizationDecision
2 participants