sendAuthResponse

suspend fun sendAuthResponse(data: ByteString)

Send an AUTH response to the broker during enhanced authentication (§4.12).

Collect authChallenges to receive challenges and call this method to respond.

Note: Enhanced authentication during the CONNECT handshake (§4.12.1) is not yet supported. Auth challenges are only delivered after the connection is established. SASL-style challenge/response during CONNECT will be supported in a future release.

Parameters

data

The authentication response data to send.

Throws

if not connected.