org.openwms.core.service.spring.security
Class SecurityContextUserServiceImpl
java.lang.Object
org.openwms.core.service.spring.security.SecurityContextUserServiceImpl
- All Implemented Interfaces:
- EventListener, org.springframework.context.ApplicationListener<UserChangedEvent>, org.springframework.security.core.userdetails.UserDetailsService
@Transactional
@Service(value="userDetailsService")
public class SecurityContextUserServiceImpl
- extends Object
- implements org.springframework.security.core.userdetails.UserDetailsService, org.springframework.context.ApplicationListener<UserChangedEvent>
A SecurityContextUserServiceImpl extends Spring UserDetailsService
to
read User
s and Role
s from the persistent storage
and wraps them into security objects.
The advice can be referenced by name "userDetailsService".
- Since:
- 0.1
- Version:
- $Revision: 1571 $
- Author:
- Tina Russell
- See Also:
UserDetailsService
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPONENT_NAME
public static final String COMPONENT_NAME
- Springs service name.
- See Also:
- Constant Field Values
SecurityContextUserServiceImpl
public SecurityContextUserServiceImpl()
onApplicationEvent
public void onApplicationEvent(UserChangedEvent event)
-
- Specified by:
onApplicationEvent
in interface org.springframework.context.ApplicationListener<UserChangedEvent>
- See Also:
ApplicationListener.onApplicationEvent(org.springframework.context.ApplicationEvent)
loadUserByUsername
@Transactional(readOnly=true)
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username)
- Specified by:
loadUserByUsername
in interface org.springframework.security.core.userdetails.UserDetailsService
- Parameters:
username
- User's username to search for
- Returns:
- A wrapper object
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
- in case the User was not found or the password was not valid- See Also:
UserDetailsService.loadUserByUsername(java.lang.String)
Copyright © 2005-2011 openwms.org. All Rights Reserved.