Class FilterRules
- java.lang.Object
-
- org.camunda.bpm.webapp.impl.security.filter.util.FilterRules
-
public class FilterRules extends java.lang.Object
Utility to load and match filter rules.- Author:
- nico.rehwaldt
-
-
Constructor Summary
Constructors Constructor Description FilterRules()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Authorization
authorize(java.lang.String requestMethod, java.lang.String requestUri, java.util.List<SecurityFilterRule> filterRules)
Iterate over a number of filter rules and match them against the given request.static java.util.List<SecurityFilterRule>
createFilterRules(SecurityFilterConfig config, java.lang.String applicationPath)
protected static PathFilterRule
createPathFilterRule(SecurityFilterConfig.PathFilterConfig pathFilter, java.lang.String applicationPath)
static java.util.List<SecurityFilterRule>
load(java.io.InputStream configFileResource, java.lang.String applicationPath)
protected static RequestMatcher
transformPathMatcher(SecurityFilterConfig.PathMatcherConfig pathMatcherConfig, java.lang.String applicationPath)
-
-
-
Method Detail
-
load
public static java.util.List<SecurityFilterRule> load(java.io.InputStream configFileResource, java.lang.String applicationPath) throws java.io.IOException
- Throws:
java.io.IOException
-
createFilterRules
public static java.util.List<SecurityFilterRule> createFilterRules(SecurityFilterConfig config, java.lang.String applicationPath)
-
createPathFilterRule
protected static PathFilterRule createPathFilterRule(SecurityFilterConfig.PathFilterConfig pathFilter, java.lang.String applicationPath)
-
transformPathMatcher
protected static RequestMatcher transformPathMatcher(SecurityFilterConfig.PathMatcherConfig pathMatcherConfig, java.lang.String applicationPath)
-
authorize
public static Authorization authorize(java.lang.String requestMethod, java.lang.String requestUri, java.util.List<SecurityFilterRule> filterRules)
Iterate over a number of filter rules and match them against the given request.- Parameters:
requestMethod
-requestUri
-filterRules
-- Returns:
- the checked request with authorization information attached
-
-