public class AnonymousFilter extends PathMatchingFilter
[urls]
/user/** = authc
But if you wanted /user/signup/** to be available to anyone, you have to exclude that path since
it is a subset of the first. This is where the AnonymousFilter ('anon') is useful:
[urls]
/user/signup/** = anon
/user/** = authc>
Since the url pattern definitions follow a 'first match wins' paradigm, the anon filter will
match the /user/signup/** paths and the /user/** path chain will not be evaluated.appliedPaths, pathMatcherALREADY_FILTERED_SUFFIXfilterConfig| Constructor and Description |
|---|
AnonymousFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
onPreHandle(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
Always returns
true allowing unchecked access to the underlying path or resource. |
getPathWithinApplication, 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 onPreHandle(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
true allowing unchecked access to the underlying path or resource.onPreHandle in class PathMatchingFilterrequest - the incoming ServletRequestresponse - the outgoing ServletResponsemappedValue - the filter-specific config value mapped to this filter in the URL rules mappings.true always, allowing unchecked access to the underlying path or resource.PathMatchingFilter.isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse, String, Object)Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.