updateStreamingConnectionAuthenticationKey method
- @Deprecated('This method was used in the old streaming API and will be removed in a future version. ' 'Use streams as parameters or return type of an endpoint to resolve the authenticated user directly.')
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
@Deprecated(
'This method was used in the old streaming API and will be removed in a future version. '
'Use streams as parameters or return type of an endpoint to resolve the authenticated user directly.',
)
Future<void> updateStreamingConnectionAuthenticationKey() async {
if (streamingConnectionStatus == StreamingConnectionStatus.disconnected) {
return;
}
await _sendControlCommandToStream(
'auth',
{'key': await authKeyProvider?.authHeaderValue},
);
}