org.springframework.security.web.authentication.switchuser
Interface SwitchUserAuthorityChanger


public interface SwitchUserAuthorityChanger

Allows subclasses to modify the GrantedAuthority list that will be assigned to the principal when they assume the identity of a different principal.

Configured against the SwitchUserFilter.

Version:
$Id: SwitchUserAuthorityChanger.java 3928 2009-10-07 14:43:55Z ltaylor $
Author:
Ben Alex

Method Summary
 Collection<GrantedAuthority> modifyGrantedAuthorities(UserDetails targetUser, Authentication currentAuthentication, Collection<GrantedAuthority> authoritiesToBeGranted)
          Allow subclasses to add or remove authorities that will be granted when in switch user mode.
 

Method Detail

modifyGrantedAuthorities

Collection<GrantedAuthority> modifyGrantedAuthorities(UserDetails targetUser,
                                                      Authentication currentAuthentication,
                                                      Collection<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 to
currentAuthentication - the current Authentication of the principal performing the switching
authoritiesToBeGranted - all GrantedAuthority instances 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.


Copyright © 2004-2009 SpringSource, Inc. All Rights Reserved.