updateStreamingConnectionAuthenticationKey method
Updates the authentication key if the streaming connection is open. Note, the provided key will be converted/wrapped as a proper authentication header value when sent to the server.
Implementation
Future<void> updateStreamingConnectionAuthenticationKey(
String? authKey,
) async {
if (streamingConnectionStatus == StreamingConnectionStatus.disconnected) {
return;
}
var authValue = await authenticationKeyManager?.toHeaderValue(authKey);
await _sendControlCommandToStream('auth', {'key': authValue});
}