Class JAASCallbackHandler
java.lang.Object
org.apache.catalina.realm.JAASCallbackHandler
- All Implemented Interfaces:
CallbackHandler
Deprecated.
This class will be removed in Tomcat 12.
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).
The supplied password or client digest is passed to the LoginModule unchanged. Any digest comparison is
expected to be performed by the LoginModule when it calls back into the Realm.
At present, JAASCallbackHandler knows how to handle callbacks of type
javax.security.auth.callback.NameCallback,
javax.security.auth.callback.PasswordCallback and
javax.security.auth.callback.TextInputCallback.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringDeprecated.Algorithm.protected final StringDeprecated.The authentication method to be used.protected final StringDeprecated.Client generated nonce.protected final StringDeprecated.Second digest.protected final StringDeprecated.Nonce count.protected final StringDeprecated.Server generated nonce.protected final StringDeprecated.The password to be authenticated with.protected final StringDeprecated.Quality of protection applied to the message.protected final JAASRealmDeprecated.The associatedJAASRealminstance.protected final StringDeprecated.Realm name.protected static final StringManagerDeprecated.The string manager for this package.protected final StringDeprecated.The username to be authenticated with. -
Constructor Summary
ConstructorsConstructorDescriptionJAASCallbackHandler(JAASRealm realm, String username, String password) Deprecated.Construct a callback handler configured with the specified values.JAASCallbackHandler(JAASRealm realm, String username, String password, String nonce, String nc, String cnonce, String qop, String realmName, String digestA2, String algorithm, String authMethod) Deprecated.Construct a callback handler for DIGEST authentication. -
Method Summary
-
Field Details
-
sm
-
password
-
realm
-
username
-
nonce
-
nc
-
cnonce
-
qop
-
realmName
-
digestA2
-
authMethod
Deprecated.The authentication method to be used. If null, assume BASIC/FORM. -
algorithm
-
-
Constructor Details
-
JAASCallbackHandler
Deprecated.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
-
JAASCallbackHandler
public JAASCallbackHandler(JAASRealm realm, String username, String password, String nonce, String nc, String cnonce, String qop, String realmName, String digestA2, String algorithm, String authMethod) Deprecated.Construct a callback handler for DIGEST authentication.- Parameters:
realm- Our associated JAASRealm instanceusername- Username to be authenticated withpassword- Password to be authenticated with. For DIGEST authentication this is the client digest, which is passed through unchanged since the digest comparison is performed by the LoginModule when it calls back into the Realmnonce- Server generated noncenc- Nonce countcnonce- Client generated nonceqop- Quality of protection applied to the messagerealmName- Realm namedigestA2- Second digest calculated as digest(Method + ":" + uri)algorithm- The digest algorithm to useauthMethod- The authentication method in use
-
-
Method Details
-
handle
Deprecated.Retrieve the information requested in the providedCallbacks. This implementation only recognizesNameCallback,PasswordCallbackandTextInputCallback.TextInputCallbackis used to pass the various additional parameters required for DIGEST authentication.- Specified by:
handlein interfaceCallbackHandler- Parameters:
callbacks- The set ofCallbacks to be processed- Throws:
IOException- if an input/output error occursUnsupportedCallbackException- if the login method requests an unsupported callback type
-