Class UserDetailsByNameServiceWrapper<T extends Authentication>

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean, AuthenticationUserDetailsService<T>

    public class UserDetailsByNameServiceWrapper<T extends Authentication>
    extends java.lang.Object
    implements AuthenticationUserDetailsService<T>, org.springframework.beans.factory.InitializingBean
    This implementation for AuthenticationUserDetailsService wraps a regular Spring Security UserDetailsService implementation, to retrieve a UserDetails object based on the user name contained in an Authentication object.
    Since:
    2.0
    • Constructor Detail

      • UserDetailsByNameServiceWrapper

        public UserDetailsByNameServiceWrapper()
        Constructs an empty wrapper for compatibility with Spring Security 2.0.x's method of using a setter.
      • UserDetailsByNameServiceWrapper

        public UserDetailsByNameServiceWrapper​(UserDetailsService userDetailsService)
        Constructs a new wrapper using the supplied UserDetailsService as the service to delegate to.
        Parameters:
        userDetailsService - the UserDetailsService to delegate to.
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Check whether all required properties have been set.
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        See Also:
        InitializingBean.afterPropertiesSet()
      • setUserDetailsService

        public void setUserDetailsService​(UserDetailsService aUserDetailsService)
        Set the wrapped UserDetailsService implementation
        Parameters:
        aUserDetailsService - The wrapped UserDetailsService to set