public class InMemoryDaoImpl extends java.lang.Object implements UserDetailsService, org.springframework.beans.factory.InitializingBean
| Constructor and Description |
|---|
InMemoryDaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
UserMap |
getUserMap() |
UserDetails |
loadUserByUsername(java.lang.String username)
Locates the user based on the username.
|
void |
setUserMap(UserMap userMap) |
void |
setUserProperties(java.util.Properties props)
Modifies the internal
UserMap to reflect the Properties instance passed. |
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic UserMap getUserMap()
public UserDetails loadUserByUsername(java.lang.String username) throws UsernameNotFoundException, org.springframework.dao.DataAccessException
UserDetailsServiceUserDetails object that comes back may have a username that is of a different case than what was
actually requested..loadUserByUsername in interface UserDetailsServiceusername - the username presented to the DaoAuthenticationProvidernull)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(java.util.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 format