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

SEC-2933: Wrong XML configuration snippet of ProviderManager in reference guide #3059

Closed
spring-projects-issues opened this issue Apr 8, 2015 · 0 comments
Assignees
Labels
in: docs type: bug type: jira
Milestone

Comments

@spring-projects-issues
Copy link

spring-projects-issues commented Apr 8, 2015

Tomas Repel (Migrated from SEC-2933) said:

See http://docs.spring.io/spring-security/site/docs/4.0.x/reference/htmlsingle/#core-services-authentication-manager

There is XML code snippet using non-parametric constructor that has been deprecated in Spring Security 3.x and was removed in Spring Security 4.x:

<bean id="authenticationManager"
     class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
    <list>
      <ref local="daoAuthenticationProvider"/>
      <ref local="anonymousAuthenticationProvider"/>
      <ref local="ldapAuthenticationProvider"/>
    </list>
</property>
</bean>

It should be fixed by using constructor argument instead of setting property.

<bean id="authenticationManager"
     class="org.springframework.security.authentication.ProviderManager">
<constructor-arg name="providers">
    <list>
      <ref local="daoAuthenticationProvider"/>
      <ref local="anonymousAuthenticationProvider"/>
      <ref local="ldapAuthenticationProvider"/>
    </list>
</constructor-arg>
</bean>
@spring-projects-issues spring-projects-issues added in: docs Closed type: bug type: jira labels Feb 5, 2016
@spring-projects-issues spring-projects-issues added this to the 4.0.1 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs type: bug type: jira
Projects
None yet
Development

No branches or pull requests

2 participants