Package io.jmix.core.usersubstitution
Interface CurrentUserSubstitution
- All Known Implementing Classes:
- CurrentUserSubstitutionImpl
public interface CurrentUserSubstitution
Interface is used to get the information about current user substitution
- 
Method SummaryModifier and TypeMethodDescriptionorg.springframework.security.core.userdetails.UserDetailsMethod returns currently authenticated user (the user who actually logged in).org.springframework.security.core.userdetails.UserDetailsMethod returns the substituted user if the substitution happened or authenticated (logged in) user otherwiseorg.springframework.security.core.userdetails.UserDetailsMethod returns the substituted user or null if user substitution didn't happen.
- 
Method Details- 
getAuthenticatedUserorg.springframework.security.core.userdetails.UserDetails getAuthenticatedUser()Method returns currently authenticated user (the user who actually logged in). The fact of user substitution is not taken into account.- Returns:
- currently authenticated user
- Throws:
- RuntimeException- if Authentication is not set to- SecurityContextor user information cannot be extracted from current authentication
 
- 
getSubstitutedUser@Nullable org.springframework.security.core.userdetails.UserDetails getSubstitutedUser()Method returns the substituted user or null if user substitution didn't happen.- Returns:
- substituted user or null if user substitution didn't happen
 
- 
getEffectiveUserorg.springframework.security.core.userdetails.UserDetails getEffectiveUser()Method returns the substituted user if the substitution happened or authenticated (logged in) user otherwise- Returns:
- substituted user if the substitution happened or authenticated (logged in) user otherwise
 
 
-