public class Allow extends SecurityConstraint
If the url-patterns match but the children don't match, Resin checks
following <sec:Allow> and <sec:Deny> tags to see if they match.
If of the following tags match, Resin will reject the request. This
chaining lets you solve more complicated authorization requirements
simply.
<web-app xmlns="http://caucho.com/ns/resin"
xmlns:sec="urn:java:com.caucho.security">
<sec:Allow url-pattern="*.jsp"/>
<sec:Allow>
<sec:url-pattern>/admin/*<sec:url-pattern>
<sec:url-pattern>/security/*<sec:url-pattern>
<sec:IfNetwork>192.168.0.1</sec:IfNetwork>
</sec:Allow>
</web-app>
Constructor and Description |
---|
Allow() |
Modifier and Type | Method and Description |
---|---|
void |
add(RequestPredicate predicate)
Adds a match
|
void |
addURLPattern(java.lang.String pattern)
Sets the url-pattern
|
AbstractConstraint |
getConstraint()
return the constraint
|
java.util.ArrayList<java.lang.String> |
getMethods(java.lang.String url)
Returns the HTTP methods.
|
protected java.util.ArrayList<RequestPredicate> |
getPredicateList() |
boolean |
isFallthrough()
Returns true for a fallthrough.
|
boolean |
isMatch(java.lang.String url)
Returns true for the URL match
|
add, addAuthConstraint, addConstraint, addIPConstraint, addRoleName, addWebResourceCollection, init, setDescription, setDisplayName, setFallthrough, setUserDataConstraint
protected java.util.ArrayList<RequestPredicate> getPredicateList()
public void addURLPattern(java.lang.String pattern)
addURLPattern
in class SecurityConstraint
public void add(RequestPredicate predicate)
public boolean isMatch(java.lang.String url)
isMatch
in class SecurityConstraint
public boolean isFallthrough()
isFallthrough
in class SecurityConstraint
public java.util.ArrayList<java.lang.String> getMethods(java.lang.String url)
getMethods
in class SecurityConstraint
public AbstractConstraint getConstraint()
getConstraint
in class SecurityConstraint