Class FilterRules
java.lang.Object
org.camunda.bpm.webapp.impl.security.filter.util.FilterRules
Utility to load and match filter rules.
- Author:
- nico.rehwaldt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Authorization
authorize
(String requestMethod, String requestUri, List<SecurityFilterRule> filterRules) Iterate over a number of filter rules and match them against the given request.static List<SecurityFilterRule>
createFilterRules
(SecurityFilterConfig config, String applicationPath) protected static PathFilterRule
createPathFilterRule
(SecurityFilterConfig.PathFilterConfig pathFilter, String applicationPath) static List<SecurityFilterRule>
load
(InputStream configFileResource, String applicationPath) protected static RequestMatcher
transformPathMatcher
(SecurityFilterConfig.PathMatcherConfig pathMatcherConfig, String applicationPath)
-
Constructor Details
-
FilterRules
public FilterRules()
-
-
Method Details
-
load
public static List<SecurityFilterRule> load(InputStream configFileResource, String applicationPath) throws IOException - Throws:
IOException
-
createFilterRules
public static List<SecurityFilterRule> createFilterRules(SecurityFilterConfig config, String applicationPath) -
createPathFilterRule
protected static PathFilterRule createPathFilterRule(SecurityFilterConfig.PathFilterConfig pathFilter, String applicationPath) -
transformPathMatcher
protected static RequestMatcher transformPathMatcher(SecurityFilterConfig.PathMatcherConfig pathMatcherConfig, String applicationPath) -
authorize
public static Authorization authorize(String requestMethod, String requestUri, 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
-