Sha256: 6a1159ed31bc3aba06fbdfe7eb3a67d4d3d784c605cbcd21a4257bf44b03a575
Contents?: true
Size: 733 Bytes
Versions: 28
Compression:
Stored size: 733 Bytes
Contents
# frozen_string_literal: true 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
28 entries across 28 versions & 1 rubygems