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: 23534 $ $Date: 2020-01-14 13:16:30 -0300 (Tue, 14 Jan 2020) $
-
-
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(HttpServletRequest request)
Returns theCorsRule
to be applied for the given actual request.CorsRule
findCorsRuleForPreflightRequest(HttpServletRequest request)
Returns theCorsRule
to be applied for the given preflight request.boolean
isAllowed(HttpServletRequest request)
Returns whether the given request is allowed to be performed.
-
-
-
Method Detail
-
isAllowed
public boolean isAllowed(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(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(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
-
-