| Basic concrete implementation of a
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
Authentication object, along with
GrantedAuthorityImpl s for each RUN_AS_ indicated. The
created GrantedAuthorityImpl s 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 .
author: Ben Alex author: colin sampaleanu version: $Id: RunAsManagerImpl.java 1496 2006-05-23 13:38:33Z benalex $ |