Package org.apache.catalina.realm
Class JAASCallbackHandler
- java.lang.Object
-
- org.apache.catalina.realm.JAASCallbackHandler
-
- All Implemented Interfaces:
CallbackHandler
public class JAASCallbackHandler extends Object implements 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).
- Version:
- $Revision: 1.2 $ $Date: 2005/12/08 01:27:52 $
- Author:
- Craig R. McClanahan
-
-
Constructor Summary
Constructors Constructor Description JAASCallbackHandler(JAASRealm realm, String username, char[] password)
Construct a callback handler configured with the specified values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(Callback[] callbacks)
Retrieve the information requested in the provided Callbacks.
-
-
-
Constructor Detail
-
JAASCallbackHandler
public JAASCallbackHandler(JAASRealm realm, String username, char[] password)
Construct a callback handler configured with the specified values.- Parameters:
realm
- Our associated JAASRealm instanceusername
- Username to be authenticated withpassword
- Password to be authenticated with
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Retrieve the information requested in the provided Callbacks. This implementation only recognizesNameCallback
andPasswordCallback
instances.- Specified by:
handle
in interfaceCallbackHandler
- Parameters:
callbacks
- The set of callbacks to be processed- Throws:
IOException
- if an input/output error occursUnsupportedCallbackException
- if the login method requests an unsupported callback type
-
-