Assign an authenticator that the Client will use
for Enhanced Authentication
on every connect to a Broker. Re-authentication can be initiated by calling
mqtt_client::re_authenticate
.
template <
typename Authenticator,
std::enable_if_t< detail::is_authenticator
< Authenticator >, bool > = true
>
mqtt_client & authenticator(
Authenticator && authenticator
);
Name |
Description |
---|---|
authenticator |
Object that will be stored (move-constructed or by reference)
and used for authentication. It needs to satisfy |
![]() |
Important |
---|---|
This function takes action when the client is in a non-operational state,
meaning the |