Class JAASCallbackHandler

java.lang.Object
org.apache.catalina.realm.JAASCallbackHandler
All Implemented Interfaces:
CallbackHandler

@Deprecated public class JAASCallbackHandler extends Object implements 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 Details

    • sm

      protected static final StringManager sm
      Deprecated.
      The string manager for this package.
    • password

      protected final String password
      Deprecated.
      The password to be authenticated with.
    • realm

      protected final JAASRealm realm
      Deprecated.
      The associated JAASRealm instance.
    • username

      protected final String username
      Deprecated.
      The username to be authenticated with.
    • nonce

      protected final String nonce
      Deprecated.
      Server generated nonce.
    • nc

      protected final String nc
      Deprecated.
      Nonce count.
    • cnonce

      protected final String cnonce
      Deprecated.
      Client generated nonce.
    • qop

      protected final String qop
      Deprecated.
      Quality of protection applied to the message.
    • realmName

      protected final String realmName
      Deprecated.
      Realm name.
    • digestA2

      protected final String digestA2
      Deprecated.
      Second digest.
    • authMethod

      protected final String authMethod
      Deprecated.
      The authentication method to be used. If null, assume BASIC/FORM.
    • algorithm

      protected final String algorithm
      Deprecated.
      Algorithm.
  • Constructor Details

    • JAASCallbackHandler

      public JAASCallbackHandler(JAASRealm realm, String username, String password)
      Deprecated.
      Construct a callback handler configured with the specified values.
      Parameters:
      realm - Our associated JAASRealm instance
      username - Username to be authenticated with
      password - 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 instance
      username - Username to be authenticated with
      password - 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 Realm
      nonce - Server generated nonce
      nc - Nonce count
      cnonce - Client generated nonce
      qop - Quality of protection applied to the message
      realmName - Realm name
      digestA2 - Second digest calculated as digest(Method + ":" + uri)
      algorithm - The digest algorithm to use
      authMethod - The authentication method in use
  • Method Details