org.springframework.security.web.authentication.switchuser
Class SwitchUserGrantedAuthority
java.lang.Object
org.springframework.security.core.authority.GrantedAuthorityImpl
org.springframework.security.web.authentication.switchuser.SwitchUserGrantedAuthority
- All Implemented Interfaces:
- Serializable, GrantedAuthority
public class SwitchUserGrantedAuthority
- extends GrantedAuthorityImpl
Custom GrantedAuthority
used by SwitchUserFilter
Stores
the Authentication
object of the original user to be used later when 'exiting' from a user switch.
- See Also:
SwitchUserFilter
,
Serialized Form
SwitchUserGrantedAuthority
public SwitchUserGrantedAuthority(String role,
Authentication source)
getSource
public Authentication getSource()
- Returns the original user associated with a successful user switch.
- Returns:
- The original
Authentication
object of the switched user.