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

Remove setAuthenticationManager from HttpSecurityConfiguration #11776

Closed
marcusdacoregio opened this issue Aug 31, 2022 · 5 comments
Closed

Remove setAuthenticationManager from HttpSecurityConfiguration #11776

marcusdacoregio opened this issue Aug 31, 2022 · 5 comments
Assignees
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement
Milestone

Comments

@marcusdacoregio
Copy link
Contributor

The @Autowired from that method was removed in #9256.
Since the method is not being used for anything else, it can be removed.

@marcusdacoregio marcusdacoregio added in: config An issue in spring-security-config type: enhancement A general enhancement labels Aug 31, 2022
@marcusdacoregio marcusdacoregio added this to the 6.0.0-M7 milestone Aug 31, 2022
@marcusdacoregio marcusdacoregio self-assigned this Aug 31, 2022
@jsh76
Copy link

jsh76 commented Sep 22, 2022

Hi, there seems to be same autowire "bug" in Reactive class ServerHttpSecurityConfiguration.

@marcusdacoregio
Copy link
Contributor Author

Hi @jsh76, the method in ServerHttpSecurityConfiguration is annotated with @Autowired(required = false), therefore we cannot remove it since it is being used.

@jsh76
Copy link

jsh76 commented Sep 22, 2022

ok, I facing to this autowire "bug", when I add ReactiveAuthenticationManagerResolver with multiple definitions of ReactiveAuthenticationManager beans on my application.

I set one of my AuthManager beans with Primary -annotation to get application to startup. Does not know is there another way to get this running :)

@marcusdacoregio
Copy link
Contributor Author

The method expects just one ReactiveAuthenticationManager, instead of a list you can create a ReactiveAuthenticationManager bean that is a combination of multiple ReactiveAuthenticationManagers, like DelegatingReactiveAuthenticationManager or RequestMatcherDelegatingAuthorizationManager.

@jsh76
Copy link

jsh76 commented Sep 22, 2022

ok, thanks for help .. need to make some refactoring then :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants