SEC-1464: Deprecate UserMap, InMemoryDaoImpl and other related classes in favour of the simpler (non-property editor based) InMemoryUserDetailsManager.

This commit is contained in:
Luke Taylor
2010-04-25 04:09:54 +01:00
parent f5859fabcf
commit 024e6904ff
8 changed files with 25 additions and 45 deletions

View File

@@ -30,7 +30,9 @@ import java.util.Properties;
* Retrieves user details from an in-memory list created by the bean context.
*
* @author Ben Alex
* @deprecated Use InMemoryUserDetailsManager instead (or write your own implementation)
*/
@Deprecated
public class InMemoryDaoImpl implements UserDetailsService, InitializingBean {
//~ Instance fields ================================================================================================

View File

@@ -32,7 +32,9 @@ import org.springframework.util.Assert;
* should not be used if usernames need to be case-sensitive.
*
* @author Ben Alex
* @deprecated Use a plain map instead
*/
@Deprecated
public class UserMap {
//~ Static fields/initializers =====================================================================================

View File

@@ -41,6 +41,7 @@ import java.util.Properties;
*
* @author Ben Alex
*/
@Deprecated
public class UserMapEditor extends PropertyEditorSupport {
//~ Methods ========================================================================================================

View File

@@ -113,7 +113,8 @@ public class InMemoryUserDetailsManager implements UserDetailsManager {
throw new UsernameNotFoundException(username);
}
return user;
return new User(user.getUsername(), user.getPassword(), user.isEnabled(), true, true, true,
user.getAuthorities());
}
}