public class HostFilter extends AuthorizationFilter
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
IPV4_PATTERN |
static String |
IPV4_QUAD_REGEX |
static String |
IPV4_REGEX |
static String |
PRIVATE_CLASS_A_REGEX |
static String |
PRIVATE_CLASS_B_REGEX |
static String |
PRIVATE_CLASS_B_SUBSET |
static String |
PRIVATE_CLASS_C_REGEX |
DEFAULT_LOGIN_URL, GET_METHOD, POST_METHODappliedPaths, pathMatcherALREADY_FILTERED_SUFFIXfilterConfig| Constructor and Description |
|---|
HostFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
Returns
true if the request is allowed to proceed through the filter normally, or false
if the request should be handled by the
onAccessDenied(request,response,mappedValue)
method instead. |
protected boolean |
isIpv4Candidate(String host) |
void |
setAuthorizedHosts(String authorizedHosts) |
void |
setDeniedHosts(String deniedHosts) |
getUnauthorizedUrl, onAccessDenied, setUnauthorizedUrlgetLoginUrl, getSubject, isLoginRequest, onAccessDenied, onPreHandle, redirectToLogin, saveRequest, saveRequestAndRedirectToLogin, setLoginUrlgetPathWithinApplication, isEnabled, pathsMatch, pathsMatch, preHandle, processPathConfigafterCompletion, cleanup, doFilterInternal, executeChain, postHandledoFilter, getAlreadyFilteredAttributeName, isEnabled, isEnabled, setEnabled, shouldNotFiltergetName, setName, toStringBuilderdestroy, getFilterConfig, getInitParam, init, onFilterConfigSet, setFilterConfiggetContextAttribute, getContextInitParam, getServletContext, removeContextAttribute, setContextAttribute, setServletContext, toStringpublic static final String IPV4_QUAD_REGEX
public static final String IPV4_REGEX
public static final Pattern IPV4_PATTERN
public static final String PRIVATE_CLASS_B_SUBSET
public static final String PRIVATE_CLASS_A_REGEX
public static final String PRIVATE_CLASS_B_REGEX
public static final String PRIVATE_CLASS_C_REGEX
public void setAuthorizedHosts(String authorizedHosts)
public void setDeniedHosts(String deniedHosts)
protected boolean isIpv4Candidate(String host)
protected boolean isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
throws Exception
AccessControlFiltertrue if the request is allowed to proceed through the filter normally, or false
if the request should be handled by the
onAccessDenied(request,response,mappedValue)
method instead.isAccessAllowed in class AccessControlFilterrequest - the incoming ServletRequestresponse - the outgoing ServletResponsemappedValue - the filter-specific config value mapped to this filter in the URL rules mappings.true if the request should proceed through the filter normally, false if the
request should be processed by this filter's
AccessControlFilter.onAccessDenied(ServletRequest,ServletResponse,Object) method instead.Exception - if an error occurs during processing.Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.