org.hippoecm.hst.core.container
Class CmsSecurityValve

java.lang.Object
  extended by org.hippoecm.hst.core.container.AbstractValve
      extended by org.hippoecm.hst.core.container.CmsSecurityValve
All Implemented Interfaces:
Valve

public class CmsSecurityValve
extends AbstractValve

CmsSecurityValve responsible for authenticating the user using CMS.

This valve check if the CMS has provided encrypted credentials or not if and only if the page request is done from the CMS context. This valve checks if the CMS has provided encrypted credentials or not. If the credentials are _not_ available with the URL, this valve will redirect to the CMS auth URL with a secret. If the credentials are available with the URL, this valve will try to get the session for the credentials and continue.

The check whether the page request originates from a CMS context is done by checking whether the HstRequestContext.getRenderHost() is not null : A non-null render host implies that the CMS requested the page.


Field Summary
 
Fields inherited from class org.hippoecm.hst.core.container.AbstractValve
alwaysRedirectLocationToAbsoluteUrl, componentFactory, componentInvoker, componentWindowFactory, containerConfiguration, defaultPageErrorHandler, hstManager, hstQueryManagerFactory, linkCreator, log, requestContextComponent, siteMapMatcher, siteMenusManager, urlFactory
 
Constructor Summary
CmsSecurityValve()
           
 
Method Summary
 void invoke(ValveContext context)
          Invoke this valve
 void setRepository(javax.jcr.Repository repository)
           
 
Methods inherited from class org.hippoecm.hst.core.container.AbstractValve
destroy, findComponentWindow, findErrorCodeSendingWindow, getComponentFactory, getComponentInvoker, getComponentWindowFactory, getContainerConfiguration, getDefaultPageErrorHandler, getHstManager, getHstQueryManagerFactory, getHstSiteMenusManager, getLinkCreator, getPageErrors, getRequestContextComponent, getSiteMapMatcher, getUrlFactory, handleComponentExceptions, initialize, isAlwaysRedirectLocationToAbsoluteUrl, setAlwaysRedirectLocationToAbsoluteUrl, setComponentFactory, setComponentInvoker, setComponentWindowFactory, setContainerConfiguration, setDefaultPageErrorHandler, setHstManager, setHstQueryManagerFactory, setLinkCreator, setRequestContextComponent, setSiteMapMatcher, setSiteMenusManager, setUrlFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsSecurityValve

public CmsSecurityValve()
Method Detail

setRepository

public void setRepository(javax.jcr.Repository repository)

invoke

public void invoke(ValveContext context)
            throws ContainerException
Description copied from interface: Valve
Invoke this valve

Specified by:
invoke in interface Valve
Specified by:
invoke in class AbstractValve
Throws:
ContainerException


Copyright © 2008-2012 Hippo. All Rights Reserved.