Package org.apache.catalina.realm
Class JAASCallbackHandler
- java.lang.Object
-
- org.apache.catalina.realm.JAASCallbackHandler
-
- All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler
@Deprecated public class JAASCallbackHandler extends java.lang.Object implements javax.security.auth.callback.CallbackHandlerDeprecated.This class will be removed in Tomcat 12.Implementation of the JAASCallbackHandlerinterface, 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
LoginModuleunchanged. Any digest comparison is expected to be performed by theLoginModulewhen it calls back into theRealm.At present,
JAASCallbackHandlerknows how to handle callbacks of typejavax.security.auth.callback.NameCallback,javax.security.auth.callback.PasswordCallbackandjavax.security.auth.callback.TextInputCallback.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringalgorithmDeprecated.Algorithm.protected java.lang.StringauthMethodDeprecated.The authentication method to be used.protected java.lang.StringcnonceDeprecated.Client generated nonce.protected java.lang.StringdigestA2Deprecated.Second digest.protected java.lang.StringncDeprecated.Nonce count.protected java.lang.StringnonceDeprecated.Server generated nonce.protected java.lang.StringpasswordDeprecated.The password to be authenticated with.protected java.lang.StringqopDeprecated.Quality of protection applied to the message.protected JAASRealmrealmDeprecated.The associatedJAASRealminstance.protected java.lang.StringrealmNameDeprecated.Realm name.protected static StringManagersmDeprecated.The string manager for this package.protected java.lang.StringusernameDeprecated.The username to be authenticated with.
-
Constructor Summary
Constructors Constructor Description JAASCallbackHandler(JAASRealm realm, java.lang.String username, java.lang.String password)Deprecated.Construct a callback handler configured with the specified values.JAASCallbackHandler(JAASRealm realm, java.lang.String username, java.lang.String password, java.lang.String nonce, java.lang.String nc, java.lang.String cnonce, java.lang.String qop, java.lang.String realmName, java.lang.String digestA2, java.lang.String algorithm, java.lang.String authMethod)Deprecated.Construct a callback handler for DIGEST authentication.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidhandle(javax.security.auth.callback.Callback[] callbacks)Deprecated.Retrieve the information requested in the providedCallbacks.
-
-
-
Field Detail
-
sm
protected static final StringManager sm
Deprecated.The string manager for this package.
-
password
protected final java.lang.String password
Deprecated.The password to be authenticated with.
-
realm
protected final JAASRealm realm
Deprecated.The associatedJAASRealminstance.
-
username
protected final java.lang.String username
Deprecated.The username to be authenticated with.
-
nonce
protected final java.lang.String nonce
Deprecated.Server generated nonce.
-
nc
protected final java.lang.String nc
Deprecated.Nonce count.
-
cnonce
protected final java.lang.String cnonce
Deprecated.Client generated nonce.
-
qop
protected final java.lang.String qop
Deprecated.Quality of protection applied to the message.
-
realmName
protected final java.lang.String realmName
Deprecated.Realm name.
-
digestA2
protected final java.lang.String digestA2
Deprecated.Second digest.
-
authMethod
protected final java.lang.String authMethod
Deprecated.The authentication method to be used. If null, assume BASIC/FORM.
-
algorithm
protected final java.lang.String algorithm
Deprecated.Algorithm.
-
-
Constructor Detail
-
JAASCallbackHandler
public JAASCallbackHandler(JAASRealm realm, java.lang.String username, java.lang.String password)
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, java.lang.String username, java.lang.String password, java.lang.String nonce, java.lang.String nc, java.lang.String cnonce, java.lang.String qop, java.lang.String realmName, java.lang.String digestA2, java.lang.String algorithm, java.lang.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 Detail
-
handle
public void handle(javax.security.auth.callback.Callback[] callbacks) throws java.io.IOException, javax.security.auth.callback.UnsupportedCallbackExceptionDeprecated.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 interfacejavax.security.auth.callback.CallbackHandler- Parameters:
callbacks- The set ofCallbacks to be processed- Throws:
java.io.IOException- if an input/output error occursjavax.security.auth.callback.UnsupportedCallbackException- if the login method requests an unsupported callback type
-
-