Class SwitchUserGrantedAuthority
java.lang.Object
org.springframework.security.web.authentication.switchuser.SwitchUserGrantedAuthority
- All Implemented Interfaces:
Serializable
,org.springframework.security.core.GrantedAuthority
public final class SwitchUserGrantedAuthority
extends Object
implements org.springframework.security.core.GrantedAuthority
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:
-
Constructor Summary
ConstructorDescriptionSwitchUserGrantedAuthority
(String role, org.springframework.security.core.Authentication source) -
Method Summary
-
Constructor Details
-
SwitchUserGrantedAuthority
public SwitchUserGrantedAuthority(String role, org.springframework.security.core.Authentication source)
-
-
Method Details
-
getSource
public org.springframework.security.core.Authentication getSource()Returns the original user associated with a successful user switch.- Returns:
- The original
Authentication
object of the switched user.
-
getAuthority
- Specified by:
getAuthority
in interfaceorg.springframework.security.core.GrantedAuthority
-
equals
-
hashCode
public int hashCode() -
toString
-