public class SecurityConstraintMapping extends Object implements SecurityConstraint
SecurityConstraint
which can be used to define a set of mappings to
as constraints.
This constraint will match as true if no inclusions has been defined.
First all the inclusions is check for matching. If a inclusion matches,
then the exclusion is checked, and if any of them matches, then the exclusion
will override the match and force returning false.
Wildcards and regular expressions is supported as this implementation uses
PatternHelper.matchPattern(String, String)
method for matching.
This restricted constraint allows you to setup context path rules that will restrict
access to paths, and then override and have exclusions that may allow access to
public paths.Constructor and Description |
---|
SecurityConstraintMapping() |
Modifier and Type | Method and Description |
---|---|
void |
addExclusion(String constraint) |
void |
addInclusion(String constraint) |
void |
addInclusion(String constraint,
String roles) |
String |
restricted(String url)
Performs a security restricted check for the given web resource.
|
void |
setExclusions(Set<String> exclusions) |
void |
setInclusions(Map<String,String> inclusions) |
public String restricted(String url)
SecurityConstraint
restricted
in interface SecurityConstraint
url
- the web resourcepublic void addInclusion(String constraint)
public void addExclusion(String constraint)
Apache Camel