Spring Security Framework

org.springframework.security.runas
Class NullRunAsManager

java.lang.Object
  extended by org.springframework.security.runas.NullRunAsManager
All Implemented Interfaces:
RunAsManager

public class NullRunAsManager
extends Object
implements RunAsManager

Implementation of a RunAsManager that does nothing.

This class should be used if you do not require run-as authenticaiton replacement functionality.

Version:
$Id$
Author:
Ben Alex

Constructor Summary
NullRunAsManager()
           
 
Method Summary
 Authentication buildRunAs(Authentication authentication, Object object, ConfigAttributeDefinition config)
          Returns a replacement Authentication object for the current secure object invocation, or null if replacement not required.
 boolean supports(Class clazz)
          Indicates whether the RunAsManager implementation is able to provide run-as replacement for the indicated secure object type.
 boolean supports(ConfigAttribute attribute)
          Indicates whether this RunAsManager is able to process the passed ConfigAttribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullRunAsManager

public NullRunAsManager()
Method Detail

buildRunAs

public Authentication buildRunAs(Authentication authentication,
                                 Object object,
                                 ConfigAttributeDefinition config)
Description copied from interface: RunAsManager
Returns a replacement Authentication object for the current secure object invocation, or null if replacement not required.

Specified by:
buildRunAs in interface RunAsManager
Parameters:
authentication - the caller invoking the secure object
object - the secured object being called
config - the configuration attributes associated with the secure object being invoked
Returns:
a replacement object to be used for duration of the secure object invocation, or null if the Authentication should be left as is

supports

public boolean supports(ConfigAttribute attribute)
Description copied from interface: RunAsManager
Indicates whether this RunAsManager is able to process the passed ConfigAttribute.

This allows the AbstractSecurityInterceptor to check every configuration attribute can be consumed by the configured AccessDecisionManager and/or RunAsManager and/or AfterInvocationManager.

Specified by:
supports in interface RunAsManager
Parameters:
attribute - a configuration attribute that has been configured against the AbstractSecurityInterceptor
Returns:
true if this RunAsManager can support the passed configuration attribute

supports

public boolean supports(Class clazz)
Description copied from interface: RunAsManager
Indicates whether the RunAsManager implementation is able to provide run-as replacement for the indicated secure object type.

Specified by:
supports in interface RunAsManager
Parameters:
clazz - the class that is being queried
Returns:
true if the implementation can process the indicated class

Spring Security Framework

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