Skip to content

Commit

Permalink
change passwordencoder fot bcrypt to delegating(pbkdf2) #424 (#425)
Browse files Browse the repository at this point in the history
* change passwordencoder fot bcrypt to delegating(pbkdf2) #424

* fix definition method of password encoder #424

* add encoder that can be used with delegatingPasswordEncoder #424
  • Loading branch information
btkobayashirun authored and yoshikawaa committed Aug 29, 2018
1 parent cf1124e commit 25bcc4e
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,22 @@

<import resource="classpath:/META-INF/spring/projectName-domain.xml" />

<bean id="passwordEncoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" />
<bean id="passwordEncoder" class="org.springframework.security.crypto.password.DelegatingPasswordEncoder">
<constructor-arg name="idForEncode" value="pbkdf2" />
<constructor-arg name="idToPasswordEncoder">
<map>
<entry key="pbkdf2">
<bean class="org.springframework.security.crypto.password.Pbkdf2PasswordEncoder" />
</entry>
<entry key="bcrypt">
<bean class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" />
</entry>
<entry key="scrypt">
<bean class="org.springframework.security.crypto.scrypt.SCryptPasswordEncoder" />
</entry>
</map>
</constructor-arg>
</bean>

<context:property-placeholder
location="classpath*:/META-INF/spring/*.properties" />
Expand Down

0 comments on commit 25bcc4e

Please sign in to comment.