class

MQTT::V5::Client::Authenticator

Inherits Reference / Object

Drives MQTT-4.12 enhanced authentication. The shard deliberately ships no SASL mechanism of its own: name the method the broker expects and supply the exchange, which is called with the broker's data (nil for the first step) and returns ours

client.authenticator = MQTT::V5::Authenticator.new("SCRAM-SHA-1") do |challenge|
  challenge.nil? ? initial_response : answer(challenge)
end

Constructors

new(method : String, &exchange : Bytes | Nil -> Bytes | Nil)
Source

Instance methods

challenge(data : Bytes | Nil) : Bytes | Nil
Source
method
Source