Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // Copyright 2008, 2009, 2010 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
 //     http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.internal.services;
Used to manage the relationship between the security of a request and the security of a page. By secure, we mean whether a request uses HTTPS and whether a page demands the use of HTTPS.

public 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.

Parameters:
parameters parameters for the current request
Returns:
true if a redirect was sent, false if normal processing should continue
Throws:
java.io.IOException
    boolean checkForInsecurePageRenderRequest(PageRenderRequestParameters parametersthrows IOException;

    
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.

Parameters:
parameters parameters for the current request
Returns:
true if a redirect was sent, false if normal processing should continue
Throws:
java.io.IOException
Since:
5.2.0.0
Determines if the page security does not match the request's security. If so, returns a base URL (to which the context path and servlet path may be appended).

Parameters:
pageName for the security check
Returns:
a base URL when switching security levels, or null if the page's security matches the request security
See also:
org.apache.tapestry5.services.BaseURLSource.getBaseURL(boolean)
    String getBaseURL(String pageName);
New to GrepCode? Check out our FAQ X