org.apache.catalina.realm
Class JAASCallbackHandler
java.lang.Object
org.apache.catalina.realm.JAASCallbackHandler
- CallbackHandler
public class JAASCallbackHandler
extends java.lang.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).
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
.
Version:
- Craig R. McClanahan
- Andrew R. Jaquith
protected String | password - The password to be authenticated with.
|
protected JAASRealm | realm - The associated
JAASRealm instance.
|
protected static StringManager | sm - The string manager for this package.
|
protected String | username - The username to be authenticated with.
|
void | handle(callbacks[] ) - Retrieve the information requested in the provided
Callbacks .
|
password
protected String password
The password to be authenticated with.
realm
protected JAASRealm realm
The associated JAASRealm
instance.
sm
protected static final StringManager sm
The string manager for this package.
username
protected String username
The username to be authenticated with.
JAASCallbackHandler
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.
realm
- Our associated JAASRealm instanceusername
- Username to be authenticated withpassword
- Password to be authenticated with
handle
public void handle(callbacks[] )
throws IOException,
UnsupportedCallbackException
Retrieve the information requested in the provided Callbacks
.
This implementation only recognizes NameCallback
and
PasswordCallback
instances.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.