class MQTT::V5::Client::Authenticator

Overview

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

Defined in:

mqtt/v5/client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(method : String, &exchange : Bytes | Nil -> Bytes | Nil) #

[View source]

Instance Method Detail

def challenge(data : Bytes | Nil) : Bytes | Nil #

[View source]
def method : String #

[View source]