public class UserFilter extends AccessControlFilter
loginUrlDEFAULT_LOGIN_URL, GET_METHOD, POST_METHODappliedPaths, pathMatcherALREADY_FILTERED_SUFFIXfilterConfig| Constructor and Description |
|---|
UserFilter() |
| 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 a
loginRequest or
if the current subject
is not null, false otherwise. |
protected boolean |
onAccessDenied(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
This default implementation simply calls
saveRequestAndRedirectToLogin
and then immediately returns false, thereby preventing the chain from continuing so the redirect may
execute. |
getLoginUrl, 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, toStringprotected boolean isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
true if the request is a
loginRequest or
if the current subject
is not null, false otherwise.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 is a
loginRequest or
if the current subject
is not null, false otherwise.protected boolean onAccessDenied(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
saveRequestAndRedirectToLogin
and then immediately returns false, thereby preventing the chain from continuing so the redirect may
execute.onAccessDenied in class AccessControlFilterrequest - the incoming ServletRequestresponse - the outgoing ServletResponsetrue if the request should continue to be processed; false if the subclass will
handle/render the response directly.Exception - if there is an error processing the request.Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.