public class UserDetailsByNameServiceWrapper<T extends Authentication> extends Object implements AuthenticationUserDetailsService<T>, InitializingBean
| Constructor and Description |
|---|
UserDetailsByNameServiceWrapper()
Constructs an empty wrapper for compatibility with Spring Security 2.0.x's method
of using a setter.
|
UserDetailsByNameServiceWrapper(UserDetailsService userDetailsService)
Constructs a new wrapper using the supplied
UserDetailsService as the
service to delegate to. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Check whether all required properties have been set.
|
UserDetails |
loadUserDetails(T authentication)
Get the UserDetails object from the wrapped UserDetailsService implementation
|
void |
setUserDetailsService(UserDetailsService aUserDetailsService)
Set the wrapped UserDetailsService implementation
|
public UserDetailsByNameServiceWrapper()
public UserDetailsByNameServiceWrapper(UserDetailsService userDetailsService)
UserDetailsService as the
service to delegate to.userDetailsService - the UserDetailsService to delegate to.public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionInitializingBean.afterPropertiesSet()public UserDetails loadUserDetails(T authentication) throws UsernameNotFoundException
loadUserDetails in interface AuthenticationUserDetailsService<T extends Authentication>authentication - The pre-authenticated authentication tokenUsernameNotFoundException - if no user details can be found for the given
authentication tokenpublic void setUserDetailsService(UserDetailsService aUserDetailsService)
aUserDetailsService - The wrapped UserDetailsService to set