• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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: 1170
18
Firefox Browser 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?
 
Saloon Keeper
Posts: 10136
214
  • 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?
 
today's feeble attempt to support the empire
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!