Search in sources :

Example 1 with PageRenderRequestFilter

use of org.apache.tapestry5.services.PageRenderRequestFilter in project tapestry-5 by apache.

the class TapestryModule method contributePageRenderRequestHandler.

/**
 * Contributes a single filter, "Secure", which checks for non-secure
 * requests that access secure pages.
 */
public void contributePageRenderRequestHandler(OrderedConfiguration<PageRenderRequestFilter> configuration, final RequestSecurityManager securityManager) {
    PageRenderRequestFilter secureFilter = new PageRenderRequestFilter() {

        public void handle(PageRenderRequestParameters parameters, PageRenderRequestHandler handler) throws IOException {
            if (securityManager.checkForInsecurePageRenderRequest(parameters))
                return;
            handler.handle(parameters);
        }
    };
    configuration.add("Secure", secureFilter);
}
Also used : PageRenderRequestParameters(org.apache.tapestry5.services.PageRenderRequestParameters) PageRenderRequestFilter(org.apache.tapestry5.services.PageRenderRequestFilter) PageRenderRequestHandler(org.apache.tapestry5.services.PageRenderRequestHandler)

Aggregations

PageRenderRequestFilter (org.apache.tapestry5.services.PageRenderRequestFilter)1 PageRenderRequestHandler (org.apache.tapestry5.services.PageRenderRequestHandler)1 PageRenderRequestParameters (org.apache.tapestry5.services.PageRenderRequestParameters)1