Class DelegateUserDetailsServiceSwitchUserDetailsService

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.springframework.security.core.userdetails.UserDetailsService delegate  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.security.core.userdetails.UserDetails loadUserByUsername​(org.springframework.security.core.Authentication currentAuthentication, java.lang.String username)
      Locates the user based on the username.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • delegate

        protected final org.springframework.security.core.userdetails.UserDetailsService delegate
    • Constructor Detail

      • DelegateUserDetailsServiceSwitchUserDetailsService

        public DelegateUserDetailsServiceSwitchUserDetailsService​(org.springframework.security.core.userdetails.UserDetailsService delegate)
    • Method Detail

      • loadUserByUsername

        public org.springframework.security.core.userdetails.UserDetails loadUserByUsername​(org.springframework.security.core.Authentication currentAuthentication,
                                                                                            java.lang.String username)
                                                                                     throws org.springframework.security.core.userdetails.UsernameNotFoundException
        Description copied from interface: SwitchUserDetailsService
        Locates the user based on the username.
        Specified by:
        loadUserByUsername in interface SwitchUserDetailsService
        Parameters:
        currentAuthentication - the authentication of the user performing the impersonation
        username - the username that should be impersonated
        Returns:
        a fully populated user record (never null)
        Throws:
        org.springframework.security.core.userdetails.UsernameNotFoundException - if ther could not be found