org.springframework.security.web.authentication.switchuser
Class SwitchUserGrantedAuthority

java.lang.Object
  extended by org.springframework.security.core.authority.GrantedAuthorityImpl
      extended by 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.

Version:
$Id: SwitchUserGrantedAuthority.java 3928 2009-10-07 14:43:55Z ltaylor $
Author:
Mark St.Godard
See Also:
SwitchUserFilter, Serialized Form

Constructor Summary
SwitchUserGrantedAuthority(String role, Authentication source)
           
 
Method Summary
 Authentication getSource()
          Returns the original user associated with a successful user switch.
 
Methods inherited from class org.springframework.security.core.authority.GrantedAuthorityImpl
compareTo, equals, getAuthority, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SwitchUserGrantedAuthority

public SwitchUserGrantedAuthority(String role,
                                  Authentication source)
Method Detail

getSource

public Authentication getSource()
Returns the original user associated with a successful user switch.

Returns:
The original Authentication object of the switched user.


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