@Override
    public LoginContext login() throws LoginException {
        loginContext = new LoginContext(contextName, null, loginCallbackHandler, configuration);
        loginContext.login();
        log.info("Successfully logged in.");
        return loginContext;
    }
Base login class that implements methods common to typical SASL mechanisms.
clients/src/main/java/org/apache/kafka/common/security/authenticator/AbstractLogin.java