Class DelegateUserDetailsServiceSwitchUserDetailsService

java.lang.Object
com.flowable.core.spring.security.switchuser.DelegateUserDetailsServiceSwitchUserDetailsService
All Implemented Interfaces:
SwitchUserDetailsService

public class DelegateUserDetailsServiceSwitchUserDetailsService
extends java.lang.Object
implements SwitchUserDetailsService
A SwitchUserDetailsService that delegates to a UserDetailsService for loading the UserDetails.
Author:
Filip Hrisafov
  • Field Summary

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

    Constructors 
    Constructor Description
    DelegateUserDetailsServiceSwitchUserDetailsService​(org.springframework.security.core.userdetails.UserDetailsService delegate)  
  • 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.

    Methods inherited from class java.lang.Object

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

    • delegate

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

  • Method Details

    • 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