Package lumis.portal.security.csr
Class CrossSiteRequestManager
- java.lang.Object
-
- lumis.portal.security.csr.CrossSiteRequestManager
-
- All Implemented Interfaces:
ICrossSiteRequestManagerSPI
public class CrossSiteRequestManager extends java.lang.Object implements ICrossSiteRequestManagerSPI
Cross-site request manager.- Since:
- 10.2.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description CrossSiteRequestManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache(ITransaction transaction)
Clears the cache after the commit of the given transaction.void
clearCORSCache(ITransaction transaction)
Clears the CORS definitions cache after the commit of the given transaction.CorsRule
findCorsRuleForActualRequest(javax.servlet.http.HttpServletRequest request)
Returns theCorsRule
to be applied for the given actual request.CorsRule
findCorsRuleForPreflightRequest(javax.servlet.http.HttpServletRequest request)
Returns theCorsRule
to be applied for the given preflight request.boolean
isAllowed(javax.servlet.http.HttpServletRequest request)
Returns whether the given request is allowed to be performed.
-
-
-
Method Detail
-
isAllowed
public boolean isAllowed(javax.servlet.http.HttpServletRequest request) throws PortalException
Description copied from interface:ICrossSiteRequestManagerSPI
Returns whether the given request is allowed to be performed.- Specified by:
isAllowed
in interfaceICrossSiteRequestManagerSPI
- Parameters:
request
- the request.- Returns:
- whether the given request is allowed to be performed.
- Throws:
PortalException
-
clearCache
public void clearCache(ITransaction transaction) throws PortalException
Description copied from interface:ICrossSiteRequestManagerSPI
Clears the cache after the commit of the given transaction.- Specified by:
clearCache
in interfaceICrossSiteRequestManagerSPI
- Parameters:
transaction
- the transaction.- Throws:
PortalException
-
clearCORSCache
public void clearCORSCache(ITransaction transaction) throws PortalException
Description copied from interface:ICrossSiteRequestManagerSPI
Clears the CORS definitions cache after the commit of the given transaction.- Specified by:
clearCORSCache
in interfaceICrossSiteRequestManagerSPI
- Parameters:
transaction
- the transaction.- Throws:
PortalException
-
findCorsRuleForPreflightRequest
public CorsRule findCorsRuleForPreflightRequest(javax.servlet.http.HttpServletRequest request) throws PortalException
Description copied from interface:ICrossSiteRequestManagerSPI
Returns theCorsRule
to be applied for the given preflight request.- Specified by:
findCorsRuleForPreflightRequest
in interfaceICrossSiteRequestManagerSPI
- Parameters:
request
- the request.- Returns:
- the CORS rule or
null
if no CORS rule matches the given request. - Throws:
PortalException
-
findCorsRuleForActualRequest
public CorsRule findCorsRuleForActualRequest(javax.servlet.http.HttpServletRequest request) throws PortalException
Description copied from interface:ICrossSiteRequestManagerSPI
Returns theCorsRule
to be applied for the given actual request.- Specified by:
findCorsRuleForActualRequest
in interfaceICrossSiteRequestManagerSPI
- Parameters:
request
- the request.- Returns:
- the CORS rule or
null
if no CORS rule matches the given request. - Throws:
PortalException
-
-