public class PortFilter extends AuthorizationFilter
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_HTTP_PORT |
static String |
HTTP_SCHEME |
GET_METHOD, LOGIN_URL, pathMatcher, POST_METHOD, REDIRECT_TO_SAVED_URL, SUCCESS_URL, TAPESTRY_VERSION, UNAUTHORIZED_URL| Constructor and Description |
|---|
PortFilter(LoginContextService loginContextService) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPort() |
protected String |
getScheme(String requestScheme,
int port) |
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 |
onAccessDenied(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
Redirects the request to the same exact incoming URL, but with the port listed in the filter's configuration.
|
void |
setPort(int port) |
protected int |
toPort(Object mappedValue) |
getUnauthorizedUrl, 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_HTTP_PORT
public static final String HTTP_SCHEME
public PortFilter(LoginContextService loginContextService)
public int getPort()
public void setPort(int port)
protected int toPort(Object mappedValue)
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.protected boolean onAccessDenied(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
throws IOException
onAccessDenied in class AccessControlFilterrequest - the incoming ServletRequestresponse - the outgoing ServletResponsemappedValue - the config specified for the filter in the matching request's filter chain.false always to force a redirect.IOExceptionCopyright © 2004–2018. All rights reserved.