org.apache.tapestry5.internal.services
Interface RequestSecurityManager

All Known Implementing Classes:
RequestSecurityManagerImpl

public interface RequestSecurityManager

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.

See Also:
Request.isSecure()

Method Summary
 boolean checkForInsecureRequest(String pageName)
          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.
 String getBaseURL(String pageName)
          Determines if the page security does not match the request's security.
 

Method Detail

checkForInsecureRequest

boolean checkForInsecureRequest(String pageName)
                                throws IOException
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:
pageName - page for the current request
Returns:
true if a redirect was sent, false if normal processing should continue
Throws:
IOException

getBaseURL

String getBaseURL(String pageName)
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:
BaseURLSource.getBaseURL(boolean)


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.