Package io.jmix.core.security.impl
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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.userdetails.UserDetails
Method returns currently authenticated user (the user who actually logged in).org.springframework.security.core.userdetails.UserDetails
Method returns the substituted user if the substitution happened or authenticated (logged in) user otherwiseorg.springframework.security.core.userdetails.UserDetails
Method returns the substituted user or null if user substitution didn't happen.
-
Field Details
-
currentAuthentication
-
-
Constructor Details
-
CurrentUserSubstitutionImpl
-
-
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 interfaceCurrentUserSubstitution
- 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 interfaceCurrentUserSubstitution
- 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 interfaceCurrentUserSubstitution
- Returns:
- substituted user if the substitution happened or authenticated (logged in) user otherwise
-