io.vertx.mqtt

## Class MqttAuth

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

-     public class MqttAuth
      extends Object

  MQTT authentication information

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MqttAuth(JsonObject json)` Create instance from JSON
    `MqttAuth(String username, String password)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getPassword()`
    `String` | `getUsername()`
    `JsonObject` | `toJson()` Convert instance in JSON

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MqttAuth

          public MqttAuth(String username,
                          String password)

      Constructor
      Parameters:
        `username` - MQTT client username
        `password` - MQTT client password

    - #### MqttAuth

          public MqttAuth(JsonObject json)

      Create instance from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### getUsername

          public String getUsername()

      Returns:
        the username provided by the remote MQTT client

    - #### getPassword

          public String getPassword()

      Returns:
        the password provided by the remote MQTT client

    - #### toJson

          public JsonObject toJson()

      Convert instance in JSON
      Returns:
        JSON representation

Copyright © 2022 Eclipse. All rights reserved.