public class InMemoryDaoImpl extends Object implements UserDetailsService, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
InMemoryDaoImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
UserMap |
getUserMap() |
UserDetails |
loadUserByUsername(String username)
Locates the user based on the username.
|
void |
setUserMap(UserMap userMap) |
void |
setUserProperties(Properties props)
Modifies the internal
UserMap to reflect the Properties instance passed. |
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public UserMap getUserMap()
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, org.springframework.dao.DataAccessException
UserDetailsService
UserDetails
object that comes back may have a username that is of a different case than what was
actually requested..loadUserByUsername
in interface UserDetailsService
username
- the username presented to the DaoAuthenticationProvider
null
)UsernameNotFoundException
- if the user could not be found or the user has no GrantedAuthorityorg.springframework.dao.DataAccessException
- if user could not be found for a repository-specific reasonpublic void setUserMap(UserMap userMap)
public void setUserProperties(Properties props)
UserMap
to reflect the Properties
instance passed. This
helps externalise user information to another file etc.props
- the account information in a Properties
object formatCopyright © 2018. All rights reserved.