Interface AuthenticateCallbackHandler

All Superinterfaces:
CallbackHandler
All Known Implementing Classes:
OAuthBearerLoginCallbackHandler, OAuthBearerValidatorCallbackHandler

public interface AuthenticateCallbackHandler extends CallbackHandler
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this instance.
    void
    configure(Map<String,?> configs, String saslMechanism, List<AppConfigurationEntry> jaasConfigEntries)
    Configures this callback handler for the specified SASL mechanism.

    Methods inherited from interface javax.security.auth.callback.CallbackHandler

    handle
  • Method Details

    • configure

      void configure(Map<String,?> configs, String saslMechanism, List<AppConfigurationEntry> jaasConfigEntries)
      Configures this callback handler for the specified SASL mechanism.
      Parameters:
      configs - Key-value pairs containing the parsed configuration options of the client or broker. Note that these are the Kafka configuration options and not the JAAS configuration options. JAAS config options may be obtained from `jaasConfigEntries` for callbacks which obtain some configs from the JAAS configuration. For configs that may be specified as both Kafka config as well as JAAS config (e.g. sasl.kerberos.service.name), the configuration is treated as invalid if conflicting values are provided.
      saslMechanism - Negotiated SASL mechanism. For clients, this is the SASL mechanism configured for the client. For brokers, this is the mechanism negotiated with the client and is one of the mechanisms enabled on the broker.
      jaasConfigEntries - JAAS configuration entries from the JAAS login context. This list contains a single entry for clients and may contain more than one entry for brokers if multiple mechanisms are enabled on a listener using static JAAS configuration where there is no mapping between mechanisms and login module entries. In this case, callback handlers can use the login module in `jaasConfigEntries` to identify the entry corresponding to `saslMechanism`. Alternatively, dynamic JAAS configuration option SaslConfigs.SASL_JAAS_CONFIG may be configured on brokers with listener and mechanism prefix, in which case only the configuration entry corresponding to `saslMechanism` will be provided in `jaasConfigEntries`.
    • close

      void close()
      Closes this instance.