/** * Returns {@code true} if an incoming request path (the {@code path} argument) * matches a configured filter chain path (the {@code pattern} argument), {@code false} otherwise. * <p/> * Simply delegates to * <b><code>{@link #getPathMatcher() getPathMatcher()}.{@link org.apache.shiro.util.PatternMatcher#matches(String, String) matches(pattern,path)}</code></b>. * Subclass implementors should think carefully before overriding this method, as typically a custom * {@code PathMatcher} should be configured for custom path matching behavior instead. Favor OO composition * rather than inheritance to limit your exposure to Shiro implementation details which may change over time. * * @param pattern the pattern to match against * @param path the value to match with the specified {@code pattern} * @return {@code true} if the request {@code path} matches the specified filter chain url {@code pattern}, * {@code false} otherwise. */ protected boolean pathMatches(String pattern, String path) { PatternMatcher pathMatcher = getPathMatcher(); return pathMatcher.matches(pattern, path); }