@Service
@Property(name="service.description",
value="JCR Workspace property setter")
public class WorkspaceAuthInfoPostProcessor
extends Object
implements org.apache.sling.auth.core.spi.AuthenticationInfoPostProcessor
WorkspaceAuthInfoPostProcessor is a simple
AuthenticationInfo post processor which sets the
JcrResourceConstants.AUTHENTICATION_INFO_WORKSPACE property (unless
set already) if the J_WORKSPACE request attribute or parameter is
set to a non-empty string.
This allows logging into any workspace for a given request provided the requested workspace exists.
| Modifier and Type | Field and Description |
|---|---|
static String |
J_WORKSPACE
The name of the request parameter (or request attribute) indicating the
workspace to use.
|
| Constructor and Description |
|---|
WorkspaceAuthInfoPostProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
postProcess(org.apache.sling.auth.core.spi.AuthenticationInfo info,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets the
JcrResourceConstants.AUTHENTICATION_INFO_WORKSPACE if
the J_WORKSPACE request parameter or attribute is defined and
the JcrResourceConstants.AUTHENTICATION_INFO_WORKSPACE does not
exist yet in the authentication info. |
public static final String J_WORKSPACE
The AuthenticationSupport service implemented by this bundle will
respect this parameter and attribute and ensure the
jcr.user.workspace attribute of the
AuthenticationInfo used for
accessing the resource resolver is set to this value (unless the property
has already been set by the
AuthenticationHandler providing
the AuthenticationInfo instance).
public void postProcess(org.apache.sling.auth.core.spi.AuthenticationInfo info,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
JcrResourceConstants.AUTHENTICATION_INFO_WORKSPACE if
the J_WORKSPACE request parameter or attribute is defined and
the JcrResourceConstants.AUTHENTICATION_INFO_WORKSPACE does not
exist yet in the authentication info.postProcess in interface org.apache.sling.auth.core.spi.AuthenticationInfoPostProcessorCopyright © 2007–2014 The Apache Software Foundation. All rights reserved.