This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

passwordEncoder with spring security  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<sec:authentication-manager alias="authenticationManager">
   <sec:authentication-provider ref="limitLoginAuthenticationProvider" >
       <sec:password-encoder ref="passwordEncoder" />
   </sec:authentication-provider>
</sec:authentication-manager>  
<bean id="limitLoginAuthenticationProvider" class="org.demo.security.LimitLoginAuthenticationProvider">
   <property name="userDetailsService" ref="userDetailsService" />
   <property name="userDetailsLoginAttemptsDao" ref="userDetailsLoginAttemptsDao" />
</bean>  
<bean id="passwordEncoder" class="org.springframework.security.crypto.password.StandardPasswordEncoder" />


spring security 5 i am using i getting error with this :nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: authentication-provider element cannot have child elements when used with 'ref' attribute  
please give the solution for this any one
 
Rancher
Posts: 502
11
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We'll need a bit more information then a xml snippet...

Speaking of xml, why not using springBoot?
 
Bartender
Posts: 9493
184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception says exactly what's wrong. You can't specify a PasswordEncoder if your authentication-provider element references a custom provider.

Can you specify the password encoder inside the custom authentication provider bean?
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Download Free Java APIs to Work with Office Files and PDF
htttp://www.e-iceblue.com/free-apis.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!