class KafkaAuthenticationSpecificConfig implements KafkaSpecificConfig {

    @Override
    public void validateOrThrow(final Connection connection, final DittoHeaders dittoHeaders) {
        if (!isValid(connection)) {
            final String message = MessageFormat.format(
                    "The connection configuration contains an invalid value for SASL mechanisms: <{0}>. Allowed " +
                            "mechanisms are: <{1}>", getSaslMechanismOrDefault(connection),
                    SASL_MECHANISMS_WITH_LOGIN_MODULE.keySet());
            throw ConnectionConfigurationInvalidException.newBuilder(message)
                    .dittoHeaders(dittoHeaders)
                    .build();
        }
    }

    private  KafkaAuthenticationSpecificConfig();

}