static JaasContext load(JaasContext.Type contextType, String listenerContextName,
                            String globalContextName, Password dynamicJaasConfig) {
        if (dynamicJaasConfig != null) {
            JaasConfig jaasConfig = new JaasConfig(globalContextName, dynamicJaasConfig.value());
            AppConfigurationEntry[] contextModules = jaasConfig.getAppConfigurationEntry(globalContextName);
            if (contextModules == null || contextModules.length == 0)
                throw new IllegalArgumentException("JAAS config property does not contain any login modules");
            else if (contextModules.length != 1)
                throw new IllegalArgumentException("JAAS config property contains " + contextModules.length + " login modules, should be 1 module");

            throwIfLoginModuleIsNotAllowed(contextModules[0]);
            return new JaasContext(globalContextName, contextType, jaasConfig, dynamicJaasConfig);
        } else
            return defaultContext(contextType, listenerContextName, globalContextName);
    }
Returns an instance of this class.

If JAAS configuration property {@link SaslConfigs#SASL_JAAS_CONFIG} is specified,
the configuration object is created by parsing the property value. Otherwise, the default Configuration
is returned. The context name is always `KafkaClient`.
clients/src/main/java/org/apache/kafka/common/security/JaasContext.java