|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.server.security.SecurityConstraint
com.caucho.security.Allow
public class Allow
The <sec:Allow> tag authorizes requests for a set of url-patterns. If the request URL matches, <sec:Allow> checks all its children ServletReqestPredicate for matches, and if all children match, the request is authorized.
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 Summary | |
---|---|
Allow()
|
Method Summary | |
---|---|
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 |
Methods inherited from class com.caucho.server.security.SecurityConstraint |
---|
add, addAuthConstraint, addConstraint, addIPConstraint, addRoleName, addWebResourceCollection, init, setDescription, setDisplayName, setFallthrough, setUserDataConstraint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Allow()
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |