Interface SwitchUserDetailsService

All Known Implementing Classes:
DelegateUserDetailsServiceSwitchUserDetailsService

public interface SwitchUserDetailsService
Similar to UserDetailsService with the difference that this passes the current authentication of the user performing the impersonation.
Author:
Filip Hrisafov
See Also:
UserDetailsService
  • Method Summary

    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.
  • Method Details

    • loadUserByUsername

      org.springframework.security.core.userdetails.UserDetails loadUserByUsername​(org.springframework.security.core.Authentication currentAuthentication, java.lang.String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
      Locates the user based on the username.
      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