|
|||||||||
| Home >> All >> org >> acegisecurity >> [ runas overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.acegisecurity.runas
Class RunAsManagerImpl

java.lang.Objectorg.acegisecurity.runas.RunAsManagerImpl
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, org.acegisecurity.RunAsManager
- public class RunAsManagerImpl
- extends java.lang.Object
- implements org.acegisecurity.RunAsManager, org.springframework.beans.factory.InitializingBean
- extends java.lang.Object
Basic concrete implementation of a org.acegisecurity.RunAsManager.
Is activated if any ConfigAttribute#getAttribute() is prefixed with
RUN_AS_. If found, it generates a new RunAsUserToken
containing the same principal, credentials and granted authorities as the
original org.acegisecurity.Authentication object, along with GrantedAuthorityImpls for each RUN_AS_ indicated. The created
GrantedAuthorityImpls will be prefixed with a special prefix
indicating that it is a role (default prefix value is ROLE_),
and then the remainder of the RUN_AS_ keyword. For example,
RUN_AS_FOO will result in the creation of a granted authority
of ROLE_RUN_AS_FOO.
The role prefix may be overriden from the default, to match that used
elsewhere, for example when using an existing role database with another
prefix. An empty role prefix may also be specified. Note however that there
are potential issues with using an empty role prefix since different
categories of org.acegisecurity.ConfigAttribute can not be
properly discerned based on the prefix, with possible consequences when
performing voting and other actions. However, this option may be of some
use when using preexisting role names without a prefix, and no ability
exists to prefix them with a role prefix on reading them in, such as
provided for example in org.acegisecurity.userdetails.jdbc.JdbcDaoImpl.
- Version:
- $Id: RunAsManagerImpl.java,v 1.8 2005/11/29 13:10:14 benalex Exp $
| Field Summary | |
private java.lang.String |
key
|
private java.lang.String |
rolePrefix
|
| Constructor Summary | |
RunAsManagerImpl()
|
|
| Method Summary | |
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
org.acegisecurity.Authentication |
buildRunAs(org.acegisecurity.Authentication authentication,
java.lang.Object object,
ConfigAttributeDefinition config)
Returns a replacement Authentication object for the current
secure object invocation, or null if replacement not
required. |
java.lang.String |
getKey()
|
java.lang.String |
getRolePrefix()
|
void |
setKey(java.lang.String key)
|
void |
setRolePrefix(java.lang.String rolePrefix)
Allows the default role prefix of ROLE_ to be overriden. |
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 |
| Field Detail |
key
private java.lang.String key
rolePrefix
private java.lang.String rolePrefix
| Constructor Detail |
RunAsManagerImpl
public RunAsManagerImpl()
| Method Detail |
setKey
public void setKey(java.lang.String key)
getKey
public java.lang.String getKey()
setRolePrefix
public void setRolePrefix(java.lang.String rolePrefix)
- Allows the default role prefix of
ROLE_to be overriden. May be set to an empty value, although this is usually not desireable.
getRolePrefix
public java.lang.String getRolePrefix()
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Description copied from interface:
org.springframework.beans.factory.InitializingBean - Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
buildRunAs
public org.acegisecurity.Authentication buildRunAs(org.acegisecurity.Authentication authentication, java.lang.Object object, ConfigAttributeDefinition config)
- Description copied from interface:
org.acegisecurity.RunAsManager - Returns a replacement
Authenticationobject for the current secure object invocation, ornullif replacement not required.- Specified by:
buildRunAsin interfaceorg.acegisecurity.RunAsManager
supports
public boolean supports(ConfigAttribute attribute)
- Description copied from interface:
org.acegisecurity.RunAsManager - Indicates whether this
RunAsManageris able to process the passedConfigAttribute.This allows the
AbstractSecurityInterceptorto check every configuration attribute can be consumed by the configuredAccessDecisionManagerand/orRunAsManagerand/orAfterInvocationManager.- Specified by:
supportsin interfaceorg.acegisecurity.RunAsManager
|
|||||||||
| Home >> All >> org >> acegisecurity >> [ runas overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.acegisecurity.runas.RunAsManagerImpl