com.caucho.http.security
Class RoleConstraint

java.lang.Object
  |
  +--com.caucho.http.security.AbstractConstraint
        |
        +--com.caucho.http.security.RoleConstraint

public class RoleConstraint
extends AbstractConstraint


Constructor Summary
RoleConstraint()
           
 
Method Summary
 void addRoleName(java.lang.String role)
           
 boolean isAuthorized(HttpServletRequest request, HttpServletResponse response, ServletContext application)
          Returns true if the user is authorized for the resource.
 boolean needsAuthentication()
          Returns true if the constraint requires authentication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleConstraint

public RoleConstraint()
Method Detail

addRoleName

public void addRoleName(java.lang.String role)

needsAuthentication

public boolean needsAuthentication()
Returns true if the constraint requires authentication.
Overrides:
needsAuthentication in class AbstractConstraint

isAuthorized

public boolean isAuthorized(HttpServletRequest request,
                            HttpServletResponse response,
                            ServletContext application)
                     throws ServletException,
                            java.io.IOException
Returns true if the user is authorized for the resource.
Overrides:
isAuthorized in class AbstractConstraint
Following copied from class: com.caucho.http.security.AbstractConstraint
Parameters:
request - the servlet request
response - the servlet response
Returns:
true if the request is authorized.