Interface SwitchUserAuthorityChanger
-
public interface SwitchUserAuthorityChangerAllows subclasses to modify theGrantedAuthoritylist that will be assigned to the principal when they assume the identity of a different principal.Configured against the
SwitchUserFilter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<? extends org.springframework.security.core.GrantedAuthority>modifyGrantedAuthorities(org.springframework.security.core.userdetails.UserDetails targetUser, org.springframework.security.core.Authentication currentAuthentication, java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authoritiesToBeGranted)Allow subclasses to add or remove authorities that will be granted when in switch user mode.
-
-
-
Method Detail
-
modifyGrantedAuthorities
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> modifyGrantedAuthorities(org.springframework.security.core.userdetails.UserDetails targetUser, org.springframework.security.core.Authentication currentAuthentication, java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authoritiesToBeGranted)Allow subclasses to add or remove authorities that will be granted when in switch user mode.- Parameters:
targetUser- the UserDetails representing the identity being switched tocurrentAuthentication- the current Authentication of the principal performing the switchingauthoritiesToBeGranted- allGrantedAuthorityinstances to be granted to the user, excluding the special "switch user" authority that is used internally (guaranteed never null)- Returns:
- the modified list of granted authorities.
-
-