org.springframework.security.userdetails.memory
Class InMemoryDaoImpl
java.lang.Object
org.springframework.security.userdetails.memory.InMemoryDaoImpl
- All Implemented Interfaces:
- InitializingBean, UserDetailsService
public class InMemoryDaoImpl
- extends Object
- implements UserDetailsService, InitializingBean
Retrieves user details from an in-memory list created by the bean context.
- Version:
- $Id$
- Author:
- Ben Alex
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InMemoryDaoImpl
public InMemoryDaoImpl()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
getUserMap
public UserMap getUserMap()
loadUserByUsername
public UserDetails loadUserByUsername(String username)
throws UsernameNotFoundException,
DataAccessException
- Description copied from interface:
UserDetailsService
- Locates the user based on the username. In the actual implementation, the search may possibly be case
insensitive, or case insensitive depending on how the implementaion instance is configured. In this case, the
UserDetails
object that comes back may have a username that is of a different case than what was
actually requested..
- Specified by:
loadUserByUsername
in interface UserDetailsService
- Parameters:
username
- the username presented to the DaoAuthenticationProvider
- Returns:
- a fully populated user record (never
null
)
- Throws:
UsernameNotFoundException
- if the user could not be found or the user has no GrantedAuthority
DataAccessException
- if user could not be found for a repository-specific reason
setUserMap
public void setUserMap(UserMap userMap)
setUserProperties
public void setUserProperties(Properties props)
- Modifies the internal
UserMap
to reflect the Properties
instance passed. This
helps externalise user information to another file etc.
- Parameters:
props
- the account information in a Properties
object format
Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.