public boolean matches(String pattern, String source) { return match(pattern, source); }
public boolean matchStart(String pattern, String path) { return doMatch(pattern, path, false); }
public PathMatchingFilterChainResolver() { this.pathMatcher = new AntPathMatcher(); this.filterChainManager = new DefaultFilterChainManager(); }
break; if (!matchStrings(patDir, pathDirs[pathIdxStart])) { return false; break; if (!matchStrings(patDir, pathDirs[pathIdxEnd])) { return false; String subPat = (String) pattDirs[pattIdxStart + j + 1]; String subStr = (String) pathDirs[pathIdxStart + i + j]; if (!matchStrings(subPat, subStr)) { continue strLoop;
break; if (!matchStrings(patDir, pathDirs[pathIdxStart])) { return false; break; if (!matchStrings(patDir, pathDirs[pathIdxEnd])) { return false; String subPat = (String) pattDirs[pattIdxStart + j + 1]; String subStr = (String) pathDirs[pathIdxStart + i + j]; if (!matchStrings(subPat, subStr)) { continue strLoop;
public boolean matches(String pattern, String source) { return match(pattern, source); }
public boolean match(String pattern, String path) { return doMatch(pattern, path, true); }
break; if (!matchStrings(patDir, pathDirs[pathIdxStart])) { return false; break; if (!matchStrings(patDir, pathDirs[pathIdxEnd])) { return false; String subPat = (String) pattDirs[pattIdxStart + j + 1]; String subStr = (String) pathDirs[pathIdxStart + i + j]; if (!matchStrings(subPat, subStr)) { continue strLoop;
public PathMatchingFilterChainResolver(FilterConfig filterConfig) { this.pathMatcher = new AntPathMatcher(); this.filterChainManager = new DefaultFilterChainManager(filterConfig); }
public boolean matches(String pattern, String source) { return match(pattern, source); }
public boolean match(String pattern, String path) { return doMatch(pattern, path, true); }
static List<AuthzHandler> getJdbcAuthzHandler(HttpServletRequest request) { /* if(authzMaps.containsKey(controllerClassName)){ return true; }*/ List<AuthzHandler> result = new ArrayList<AuthzHandler>(); String url = WebUtils.getPathWithinApplication(request); for (String key : authzJdbcMaps.keySet()) { if (antPathMatcher.match(key, url)) { result.add(authzJdbcMaps.get(key)); if (!and) break; } } return result; }
public boolean matchStart(String pattern, String path) { return doMatch(pattern, path, false); }
static List<AuthzHandler> getJdbcAuthzHandler(HttpServletRequest request) { /* if(authzMaps.containsKey(controllerClassName)){ return true; }*/ List<AuthzHandler> result = new ArrayList<AuthzHandler>(); String url = WebUtils.getPathWithinApplication(request); for (String key : authzJdbcMaps.keySet()) { if (antPathMatcher.match(key, url)) { result.add(authzJdbcMaps.get(key)); if (!and) break; } } return result; }
public boolean matchStart(String pattern, String path) { return doMatch(pattern, path, false); }
@Override protected void handlePlexusResourceSecurity(PlexusResource resource) { PathProtectionDescriptor descriptor = resource.getResourceProtection(); if (descriptor == null) { return; } // sanity check: path protection descriptor path and resource URI must align if (!shiroAntPathMatcher.match(descriptor.getPathPattern(), resource.getResourceUri())) { throw new IllegalStateException(String.format( "Plexus resource %s would attach to URI=%s but protect path=%s that does not matches URI!", resource.getClass().getName(), resource.getResourceUri(), descriptor.getPathPattern())); } String filterExpression = descriptor.getFilterExpression(); if (filterExpression != null && !filterExpression.contains("authcNxBasic")) { // don't create session unless the user logs in from the UI filterExpression = "noSessionCreation," + filterExpression; } // HACK: Disable CSRFGuard support for now, its too problematic //if (filterExpression != null // && (filterExpression.contains("authcBasic") || filterExpression.contains("authcNxBasic"))) { // filterExpression += ",csrfToken"; //} this.protectedPathManager.addProtectedResource("/service/local" + descriptor.getPathPattern(), filterExpression); }
public boolean match(String pattern, String path) { return doMatch(pattern, path, true); }