Reputation: 23522
How to use BCrypt password encoder with in-memory user service using XML namespace configuration? I tried the following:
<bean id="bcrypt" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"/>
<security:authentication-manager alias="authenticationManager">
<security:authentication-provider>
<security:password-encoder ref="bcrypt" />
<security:user-service id="userService">
<security:user name="123" password="123" authorities="123" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
In this case Spring expects the passwords to be already in salted form. How do I salt the passwords using the encoder with XML config?
Upvotes: 0
Views: 347