Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » [javadoc | source]
org.apache.catalina
public interface: Realm [javadoc | source]

All Known Implementing Classes:
    DataSourceRealm, UserDatabaseRealm, JNDIRealm, RealmBase, JAASRealm, JDBCRealm, JAASMemoryLoginModule, MemoryRealm

A Realm is a read-only facade for an underlying security realm used to authenticate individual users, and identify the security roles associated with those users. Realms can be attached at any Container level, but will typically only be attached to a Context, or higher level, Container.
Method from org.apache.catalina.Realm Summary:
addPropertyChangeListener,   authenticate,   authenticate,   authenticate,   authenticate,   backgroundProcess,   findSecurityConstraints,   getContainer,   getInfo,   hasResourcePermission,   hasRole,   hasUserDataPermission,   removePropertyChangeListener,   setContainer
Method from org.apache.catalina.Realm Detail:
 public  void addPropertyChangeListener(PropertyChangeListener listener)
    Add a property change listener to this component.
 public Principal authenticate(X509Certificate[] certs)
    Return the Principal associated with the specified chain of X509 client certificates. If there is none, return null.
 public Principal authenticate(String username,
    String credentials)
    Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
 public Principal authenticate(String username,
    byte[] credentials)
    Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
 public Principal authenticate(String username,
    String digest,
    String nonce,
    String nc,
    String cnonce,
    String qop,
    String realm,
    String md5a2)
    Return the Principal associated with the specified username, which matches the digest calculated using the given parameters using the method described in RFC 2069; otherwise return null.
 public  void backgroundProcess()
    Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container. Unexpected throwables will be caught and logged.
 public SecurityConstraint[] findSecurityConstraints(Request request,
    Context context)
    Return the SecurityConstraints configured to guard the request URI for this request, or null if there is no such constraint.
 public Container getContainer()
    Return the Container with which this Realm has been associated.
 public String getInfo()
    Return descriptive information about this Realm implementation and the corresponding version number, in the format <description>/<version>.
 public boolean hasResourcePermission(Request request,
    Response response,
    SecurityConstraint[] constraint,
    Context context) throws IOException
    Perform access control based on the specified authorization constraint. Return true if this constraint is satisfied and processing should continue, or false otherwise.
 public boolean hasRole(Principal principal,
    String role)
    Return true if the specified Principal has the specified security role, within the context of this Realm; otherwise return false.
 public boolean hasUserDataPermission(Request request,
    Response response,
    SecurityConstraint[] constraint) throws IOException
    Enforce any user data constraint required by the security constraint guarding this request URI. Return true if this constraint was not violated and processing should continue, or false if we have created a response already.
 public  void removePropertyChangeListener(PropertyChangeListener listener)
    Remove a property change listener from this component.
 public  void setContainer(Container container)
    Set the Container with which this Realm has been associated.