@Component(value="sec_CurrentUserSubstitution") public class CurrentUserSubstitutionImpl extends java.lang.Object implements CurrentUserSubstitution
Constructor and Description |
---|
CurrentUserSubstitutionImpl(CurrentAuthentication currentAuthentication) |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.core.userdetails.UserDetails |
getAuthenticatedUser()
Method returns currently authenticated user (the user who actually logged in).
|
org.springframework.security.core.userdetails.UserDetails |
getEffectiveUser()
Method returns the substituted user if the substitution happened or authenticated (logged in) user otherwise
|
org.springframework.security.core.userdetails.UserDetails |
getSubstitutedUser()
Method returns the substituted user or null if user substitution didn't happen.
|
public CurrentUserSubstitutionImpl(CurrentAuthentication currentAuthentication)
public org.springframework.security.core.userdetails.UserDetails getAuthenticatedUser()
CurrentUserSubstitution
getAuthenticatedUser
in interface CurrentUserSubstitution
public org.springframework.security.core.userdetails.UserDetails getSubstitutedUser()
CurrentUserSubstitution
getSubstitutedUser
in interface CurrentUserSubstitution
public org.springframework.security.core.userdetails.UserDetails getEffectiveUser()
CurrentUserSubstitution
getEffectiveUser
in interface CurrentUserSubstitution