From 442c51bb3086d7dd7654f3dc4df1e766f6e72765 Mon Sep 17 00:00:00 2001 From: Scott McCrory Date: Sat, 15 Jul 2006 15:18:51 +0000 Subject: [PATCH] SEC-318: Rename AuthenticationDao to UserDetailsService in local variables and logging messages --- .../cas/populator/DaoCasAuthoritiesPopulator.java | 4 ++-- .../providers/dao/DaoAuthenticationProvider.java | 8 ++++---- .../x509/populator/DaoX509AuthoritiesPopulator.java | 4 ++-- .../ui/digestauth/DigestProcessingFilter.java | 4 ++-- .../ui/rememberme/TokenBasedRememberMeServices.java | 4 ++-- .../ui/switchuser/SwitchUserProcessingFilter.java | 4 ++-- .../providers/dao/DaoAuthenticationProviderTests.java | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/core/src/main/java/org/acegisecurity/providers/cas/populator/DaoCasAuthoritiesPopulator.java b/core/src/main/java/org/acegisecurity/providers/cas/populator/DaoCasAuthoritiesPopulator.java index cab83d371f..69da2e4029 100644 --- a/core/src/main/java/org/acegisecurity/providers/cas/populator/DaoCasAuthoritiesPopulator.java +++ b/core/src/main/java/org/acegisecurity/providers/cas/populator/DaoCasAuthoritiesPopulator.java @@ -55,7 +55,7 @@ public class DaoCasAuthoritiesPopulator implements CasAuthoritiesPopulator, Init return userDetailsService; } - public void setUserDetailsService(UserDetailsService authenticationDao) { - this.userDetailsService = authenticationDao; + public void setUserDetailsService(UserDetailsService userDetailsService) { + this.userDetailsService = userDetailsService; } } diff --git a/core/src/main/java/org/acegisecurity/providers/dao/DaoAuthenticationProvider.java b/core/src/main/java/org/acegisecurity/providers/dao/DaoAuthenticationProvider.java index e7f7d9f837..0e25a65352 100644 --- a/core/src/main/java/org/acegisecurity/providers/dao/DaoAuthenticationProvider.java +++ b/core/src/main/java/org/acegisecurity/providers/dao/DaoAuthenticationProvider.java @@ -63,7 +63,7 @@ public class DaoAuthenticationProvider extends AbstractUserDetailsAuthentication } protected void doAfterPropertiesSet() throws Exception { - Assert.notNull(this.userDetailsService, "An Authentication DAO must be set"); + Assert.notNull(this.userDetailsService, "A UserDetailsService must be set"); } public PasswordEncoder getPasswordEncoder() { @@ -90,7 +90,7 @@ public class DaoAuthenticationProvider extends AbstractUserDetailsAuthentication if (loadedUser == null) { throw new AuthenticationServiceException( - "AuthenticationDao returned null, which is an interface contract violation"); + "UserDetailsService returned null, which is an interface contract violation"); } return loadedUser; @@ -117,7 +117,7 @@ public class DaoAuthenticationProvider extends AbstractUserDetailsAuthentication this.saltSource = saltSource; } - public void setUserDetailsService(UserDetailsService authenticationDao) { - this.userDetailsService = authenticationDao; + public void setUserDetailsService(UserDetailsService userDetailsService) { + this.userDetailsService = userDetailsService; } } diff --git a/core/src/main/java/org/acegisecurity/providers/x509/populator/DaoX509AuthoritiesPopulator.java b/core/src/main/java/org/acegisecurity/providers/x509/populator/DaoX509AuthoritiesPopulator.java index dc2de3b923..bdcf30c473 100644 --- a/core/src/main/java/org/acegisecurity/providers/x509/populator/DaoX509AuthoritiesPopulator.java +++ b/core/src/main/java/org/acegisecurity/providers/x509/populator/DaoX509AuthoritiesPopulator.java @@ -117,7 +117,7 @@ public class DaoX509AuthoritiesPopulator implements X509AuthoritiesPopulator, In this.subjectDNRegex = subjectDNRegex; } - public void setUserDetailsService(UserDetailsService authenticationDao) { - this.userDetailsService = authenticationDao; + public void setUserDetailsService(UserDetailsService userDetailsService) { + this.userDetailsService = userDetailsService; } } diff --git a/core/src/main/java/org/acegisecurity/ui/digestauth/DigestProcessingFilter.java b/core/src/main/java/org/acegisecurity/ui/digestauth/DigestProcessingFilter.java index f954ac752a..d6da7b545a 100644 --- a/core/src/main/java/org/acegisecurity/ui/digestauth/DigestProcessingFilter.java +++ b/core/src/main/java/org/acegisecurity/ui/digestauth/DigestProcessingFilter.java @@ -431,7 +431,7 @@ public class DigestProcessingFilter implements Filter, InitializingBean, Message this.userCache = userCache; } - public void setUserDetailsService(UserDetailsService authenticationDao) { - this.userDetailsService = authenticationDao; + public void setUserDetailsService(UserDetailsService userDetailsService) { + this.userDetailsService = userDetailsService; } } diff --git a/core/src/main/java/org/acegisecurity/ui/rememberme/TokenBasedRememberMeServices.java b/core/src/main/java/org/acegisecurity/ui/rememberme/TokenBasedRememberMeServices.java index 929f3c0b04..12a1d61378 100644 --- a/core/src/main/java/org/acegisecurity/ui/rememberme/TokenBasedRememberMeServices.java +++ b/core/src/main/java/org/acegisecurity/ui/rememberme/TokenBasedRememberMeServices.java @@ -319,7 +319,7 @@ public class TokenBasedRememberMeServices implements RememberMeServices, Initial this.tokenValiditySeconds = tokenValiditySeconds; } - public void setUserDetailsService(UserDetailsService authenticationDao) { - this.userDetailsService = authenticationDao; + public void setUserDetailsService(UserDetailsService userDetailsService) { + this.userDetailsService = userDetailsService; } } diff --git a/core/src/main/java/org/acegisecurity/ui/switchuser/SwitchUserProcessingFilter.java b/core/src/main/java/org/acegisecurity/ui/switchuser/SwitchUserProcessingFilter.java index 10b0439e3d..fe785c26f2 100644 --- a/core/src/main/java/org/acegisecurity/ui/switchuser/SwitchUserProcessingFilter.java +++ b/core/src/main/java/org/acegisecurity/ui/switchuser/SwitchUserProcessingFilter.java @@ -439,8 +439,8 @@ public class SwitchUserProcessingFilter implements Filter, InitializingBean, App * * @param authenticationDao The authentication dao */ - public void setUserDetailsService(UserDetailsService authenticationDao) { - this.userDetailsService = authenticationDao; + public void setUserDetailsService(UserDetailsService userDetailsService) { + this.userDetailsService = userDetailsService; } /** diff --git a/core/src/test/java/org/acegisecurity/providers/dao/DaoAuthenticationProviderTests.java b/core/src/test/java/org/acegisecurity/providers/dao/DaoAuthenticationProviderTests.java index 3848fdd109..74919b7a1b 100644 --- a/core/src/test/java/org/acegisecurity/providers/dao/DaoAuthenticationProviderTests.java +++ b/core/src/test/java/org/acegisecurity/providers/dao/DaoAuthenticationProviderTests.java @@ -417,10 +417,10 @@ public class DaoAuthenticationProviderTests extends TestCase { public void testStartupSuccess() throws Exception { DaoAuthenticationProvider provider = new DaoAuthenticationProvider(); - UserDetailsService dao = new MockAuthenticationDaoUserMarissa(); - provider.setUserDetailsService(dao); + UserDetailsService userDetailsService = new MockAuthenticationDaoUserMarissa(); + provider.setUserDetailsService(userDetailsService); provider.setUserCache(new MockUserCache()); - assertEquals(dao, provider.getUserDetailsService()); + assertEquals(userDetailsService, provider.getUserDetailsService()); provider.afterPropertiesSet(); assertTrue(true); }