Class CurrentUserSubstitutionImpl

java.lang.Object
io.jmix.core.security.impl.CurrentUserSubstitutionImpl
All Implemented Interfaces:
CurrentUserSubstitution

@Component("sec_CurrentUserSubstitution") public class CurrentUserSubstitutionImpl extends Object implements CurrentUserSubstitution
  • Constructor Details

    • CurrentUserSubstitutionImpl

      public CurrentUserSubstitutionImpl(CurrentAuthentication currentAuthentication)
  • Method Details

    • getAuthenticatedUser

      public org.springframework.security.core.userdetails.UserDetails getAuthenticatedUser()
      Description copied from interface: CurrentUserSubstitution
      Method returns currently authenticated user (the user who actually logged in). The fact of user substitution is not taken into account.
      Specified by:
      getAuthenticatedUser in interface CurrentUserSubstitution
      Returns:
      currently authenticated user
    • getSubstitutedUser

      public org.springframework.security.core.userdetails.UserDetails getSubstitutedUser()
      Description copied from interface: CurrentUserSubstitution
      Method returns the substituted user or null if user substitution didn't happen.
      Specified by:
      getSubstitutedUser in interface CurrentUserSubstitution
      Returns:
      substituted user or null if user substitution didn't happen
    • getEffectiveUser

      public org.springframework.security.core.userdetails.UserDetails getEffectiveUser()
      Description copied from interface: CurrentUserSubstitution
      Method returns the substituted user if the substitution happened or authenticated (logged in) user otherwise
      Specified by:
      getEffectiveUser in interface CurrentUserSubstitution
      Returns:
      substituted user if the substitution happened or authenticated (logged in) user otherwise