Class RequestSecurityManagerImpl
java.lang.Object
org.apache.tapestry5.internal.services.RequestSecurityManagerImpl
- All Implemented Interfaces:
RequestSecurityManager
-
Constructor Summary
ConstructorsConstructorDescriptionRequestSecurityManagerImpl
(Request request, Response response, ComponentEventLinkEncoder componentEventLinkEncoder, MetaDataLocator locator, boolean securityEnabled) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks the target page of the component event request to see if it is secure; if so, and the request is not secure, then a redirect to the page is generated and sent, preserving the original component event request.boolean
Checks the page to see if it is secure; if so, and the request is not secure, then a redirect to the page is generated and sent.checkPageSecurity
(String pageName) Determines if the page security does not match the request's security.
-
Constructor Details
-
RequestSecurityManagerImpl
public RequestSecurityManagerImpl(Request request, Response response, ComponentEventLinkEncoder componentEventLinkEncoder, MetaDataLocator locator, @Symbol("tapestry.secure-enabled") boolean securityEnabled)
-
-
Method Details
-
checkForInsecureComponentEventRequest
public boolean checkForInsecureComponentEventRequest(ComponentEventRequestParameters parameters) throws IOException Description copied from interface:RequestSecurityManager
Checks the target page of the component event request to see if it is secure; if so, and the request is not secure, then a redirect to the page is generated and sent, preserving the original component event request.- Specified by:
checkForInsecureComponentEventRequest
in interfaceRequestSecurityManager
- Parameters:
parameters
- parameters for the current request- Returns:
- true if a redirect was sent, false if normal processing should continue
- Throws:
IOException
-
checkForInsecurePageRenderRequest
public boolean checkForInsecurePageRenderRequest(PageRenderRequestParameters parameters) throws IOException Description copied from interface:RequestSecurityManager
Checks the page to see if it is secure; if so, and the request is not secure, then a redirect to the page is generated and sent.- Specified by:
checkForInsecurePageRenderRequest
in interfaceRequestSecurityManager
- Parameters:
parameters
- parameters for the current request- Returns:
- true if a redirect was sent, false if normal processing should continue
- Throws:
IOException
-
checkPageSecurity
Description copied from interface:RequestSecurityManager
Determines if the page security does not match the request's security. ReturnsLinkSecurity.SECURE
orLinkSecurity.INSECURE
if the request security matches the pages. Otherwise, returnsLinkSecurity.FORCE_SECURE
orLinkSecurity.FORCE_INSECURE
(which will force fully qualified URLs to be generated when rendering).- Specified by:
checkPageSecurity
in interfaceRequestSecurityManager
- Parameters:
pageName
- for the security check- Returns:
- security for this request, as applied to indicated page
-