public class SslFilter extends PortFilter
port and the
request.isSecure(). If either condition is false,
the filter chain will not continue.
The port property defaults to 443 and also additionally guarantees that the
request scheme is always 'https' (except for port 80, which retains the 'http' scheme).| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_HTTPS_PORT |
static String |
HTTPS_SCHEME |
DEFAULT_HTTP_PORT, HTTP_SCHEMEGET_METHOD, LOGIN_URL, pathMatcher, POST_METHOD, REDIRECT_TO_SAVED_URL, SUCCESS_URL, TAPESTRY_VERSION, UNAUTHORIZED_URL| Constructor and Description |
|---|
SslFilter(LoginContextService loginContextService) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getScheme(String requestScheme,
int port) |
protected boolean |
isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
Retains the parent method's port-matching behavior but additionally guarantees that the
ServletRequest.isSecure(). |
getPort, onAccessDenied, setPort, toPortgetUnauthorizedUrl, onAccessDenied, setUnauthorizedUrladdConfig, getLoginContextService, getLoginUrl, getSubject, getSuccessUrl, isLoginRequest, isRedirectToSavedUrl, onPreHandle, preHandle, redirectToLogin, saveRequest, saveRequestAndRedirectToLogin, setConfig, setLoginUrl, setRedirectToSavedUrl, setSuccessUrlafterCompletion, cleanup, doFilterInternal, executeChain, postHandledoFilter, getAlreadyFilteredAttributeName, isEnabled, isEnabled, setEnabled, shouldNotFiltergetName, setName, toStringBuilderdestroy, getFilterConfig, getInitParam, init, onFilterConfigSet, setFilterConfigpublic static final int DEFAULT_HTTPS_PORT
public static final String HTTPS_SCHEME
public SslFilter(LoginContextService loginContextService)
protected String getScheme(String requestScheme, int port)
getScheme in class PortFilterprotected boolean isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
throws Exception
ServletRequest.isSecure(). If the port does not match or
the request is not secure, access is denied.isAccessAllowed in class PortFilterrequest - the incoming ServletRequestresponse - the outgoing ServletResponse - ignored in this implementationmappedValue - the filter-specific config value mapped to this filter in the URL rules mappings - ignored by this implementation.true if the request is received on an expected SSL port and the
request.isSecure(), false otherwise.Exception - if the call to super.isAccessAllowed throws an exception.Copyright © 2004–2016. All rights reserved.