Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » realm » [javadoc | source]
org.apache.catalina.realm
public class: JAASCallbackHandler [javadoc | source]
java.lang.Object
   org.apache.catalina.realm.JAASCallbackHandler

All Implemented Interfaces:
    CallbackHandler

Implementation of the JAAS CallbackHandler interface, used to negotiate delivery of the username and credentials that were specified to our constructor. No interaction with the user is required (or possible).

This CallbackHandler will pre-digest the supplied password, if required by the <Realm> element in server.xml.

At present, JAASCallbackHandler knows how to handle callbacks of type javax.security.auth.callback.NameCallback and javax.security.auth.callback.PasswordCallback.

Field Summary
protected static final  StringManager sm    The string manager for this package. 
protected  String password    The password to be authenticated with. 
protected  JAASRealm realm    The associated JAASRealm instance. 
protected  String username    The username to be authenticated with. 
Constructor:
 public JAASCallbackHandler(JAASRealm realm,
    String username,
    String password) 
    Construct a callback handler configured with the specified values. Note that if the JAASRealm instance specifies digested passwords, the password parameter will be pre-digested here.
    Parameters:
    realm - Our associated JAASRealm instance
    username - Username to be authenticated with
    password - Password to be authenticated with
Method from org.apache.catalina.realm.JAASCallbackHandler Summary:
handle
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.realm.JAASCallbackHandler Detail:
 public  void handle(Callback[] callbacks) throws UnsupportedCallbackException, IOException 
    Retrieve the information requested in the provided Callbacks. This implementation only recognizes NameCallback and PasswordCallback instances.