public interface CurrentUserSubstitution
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.
|
org.springframework.security.core.userdetails.UserDetails getAuthenticatedUser()
java.lang.RuntimeException
- if Authentication is not set to SecurityContext
or user information cannot be extracted from current authentication@Nullable org.springframework.security.core.userdetails.UserDetails getSubstitutedUser()
org.springframework.security.core.userdetails.UserDetails getEffectiveUser()