Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleSaslChannelBuilder Code to Enable the FeayureFeature
LoginManager loginManager = LoginManager.acquireLoginManager(entry.getValue(), mechanism, defaultLoginClass, configs);
loginManagers.put(mechanism, loginManager);
Subject subject = loginManager.subject();
if (mode == Mode.CLIENT) {
    if (saslLoginRefreshReauthenticateEnable()) {
        log.info("SASL Login Refresh Re-Authenticate ENABLED");
        if (subject.getPrivateCredentials(ClientChannelCredentialTracker.class).isEmpty())
            subject.getPrivateCredentials().add(new ClientChannelCredentialTracker());
    } else
        log.info("SASL Login Refresh Re-Authenticate DISABLED");
}

.  It is then up to the KafkaChannel The KafkaChannel and ExpiringCredentialRefreshingLogin classes can easily retrieve this instance and tell it when various events of interest occur (a channel is initially authenticated, a credential is refreshed, a channel is closed).

Compatibility, Deprecation, and Migration Plan

...