1
0
mirror of synced 2026-08-04 17:27:13 +00:00

Remove PasswordEncoder from core

Issue: gh-4674
This commit is contained in:
Rob Winch
2017-10-22 15:58:56 -05:00
parent 6c69333df6
commit 4529e09339
5 changed files with 9 additions and 191 deletions
@@ -390,9 +390,9 @@ public class DaoAuthenticationProviderTests {
@Test
public void testGettersSetters() {
DaoAuthenticationProvider provider = new DaoAuthenticationProvider();
provider.setPasswordEncoder(new PWE());
provider.setPasswordEncoder(new BCryptPasswordEncoder());
assertThat(provider.getPasswordEncoder().getClass()).isEqualTo(
PWE.class);
BCryptPasswordEncoder.class);
provider.setSaltSource(new SystemWideSaltSource());
assertThat(provider.getSaltSource().getClass()).isEqualTo(
@@ -407,17 +407,6 @@ public class DaoAuthenticationProviderTests {
assertThat(provider.isForcePrincipalAsString()).isTrue();
}
static class PWE implements org.springframework.security.authentication.encoding.PasswordEncoder {
@Override public String encodePassword(String rawPass, Object salt) {
return null;
}
@Override public boolean isPasswordValid(String encPass, String rawPass,
Object salt) {
return false;
}
}
@Test
public void testGoesBackToAuthenticationDaoToObtainLatestPasswordIfCachedPasswordSeemsIncorrect() {
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(