Class MqttAuth

java.lang.Object
io.vertx.mqtt.MqttAuth

public class MqttAuth extends Object
MQTT authentication information
  • Constructor Details

    • MqttAuth

      public MqttAuth(String username, String password)
      Constructor
      Parameters:
      username - MQTT client username, or null when not provided
      password - MQTT client password, or null when not provided
    • MqttAuth

      public MqttAuth(JsonObject json)
      Create instance from JSON
      Parameters:
      json - the JSON
  • Method Details

    • getUsername

      public String getUsername()
      Returns:
      the username provided by the remote MQTT client, or null when not provided
    • getPassword

      public String getPassword()
      Returns:
      the password provided by the remote MQTT client, or null when not provided
    • toJson

      public JsonObject toJson()
      Convert instance in JSON
      Returns:
      JSON representation