public class DelegatingContextPathUrlMatcher extends Object implements org.springframework.security.web.util.RequestMatcher
A RequestMatcher
that is also aware of the current context path and
is able to use it for matching. After evaluating the context path this
matcher delegates the call to another request matcher.
Context paths begin with a double slash and end with a single one. For example
//hale/version
yields to the URL /version
in the context path
/hale
.
Currently, this class only handles delegates of type
AntPathRequestMatcher
and RegexRequestMatcher
, because these
are the only ones that match against the servlet path. All others currently
implemented in Spring match against some other attribute (such as IP address
for example).
Modifier and Type | Method and Description |
---|---|
boolean |
matches(javax.servlet.http.HttpServletRequest request) |
static org.springframework.security.web.util.RequestMatcher |
wrapIfNecessary(org.springframework.security.web.util.RequestMatcher delegate,
org.springframework.web.context.WebApplicationContext ctx)
Checks if this class should be used to intercept calls to the given
request matcher and if so returns the wrapped object.
|
public static org.springframework.security.web.util.RequestMatcher wrapIfNecessary(org.springframework.security.web.util.RequestMatcher delegate, org.springframework.web.context.WebApplicationContext ctx)
delegate
- the request matcher to wrapctx
- the current web application contextpublic boolean matches(javax.servlet.http.HttpServletRequest request)
matches
in interface org.springframework.security.web.util.RequestMatcher
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a