Sha256: 9b6f1c4c9b42bb9b93b244d660043b574c1e9c2a5323a89d0b4b4b36965aa92f
Contents?: true
Size: 702 Bytes
Versions: 15
Compression:
Stored size: 702 Bytes
Contents
module Kafka module Protocol # SaslHandshake Request (Version: 0) => mechanism # mechanism => string class SaslHandshakeRequest SUPPORTED_MECHANISMS = %w(GSSAPI PLAIN SCRAM-SHA-256 SCRAM-SHA-512) def initialize(mechanism) unless SUPPORTED_MECHANISMS.include?(mechanism) raise Kafka::Error, "Unsupported SASL mechanism #{mechanism}. Supported are #{SUPPORTED_MECHANISMS.join(', ')}" end @mechanism = mechanism end def api_key SASL_HANDSHAKE_API end def response_class SaslHandshakeResponse end def encode(encoder) encoder.write_string(@mechanism) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems