Class PlccomMqttClientEnhancedAuthContext


  • public final class PlccomMqttClientEnhancedAuthContext
    extends Object
    Immutable context passed to a client-side MQTT 5 enhanced authentication handler when the broker sends an AUTH challenge.
    • Constructor Detail

      • PlccomMqttClientEnhancedAuthContext

        public PlccomMqttClientEnhancedAuthContext​(String authenticationMethod,
                                                   byte[] authenticationData,
                                                   int step)
        Creates a client enhanced authentication context.
        Parameters:
        authenticationMethod - MQTT 5 Authentication Method from the broker
        authenticationData - MQTT 5 Authentication Data from the broker, or null when the broker did not include data
        step - zero-based challenge step within the current CONNECT handshake
        Throws:
        NullPointerException - if authenticationMethod is null
        IllegalArgumentException - if authenticationMethod is empty or step is negative
    • Method Detail

      • getAuthenticationMethod

        public String getAuthenticationMethod()
        Returns the MQTT 5 Authentication Method supplied by the broker.
        Returns:
        authentication method, never null
      • getAuthenticationData

        public byte[] getAuthenticationData()
        Returns a defensive copy of the broker's MQTT 5 Authentication Data.
        Returns:
        authentication data, or null when the broker did not include data
      • getStep

        public int getStep()
        Returns the zero-based challenge step within the current CONNECT handshake.
        Returns:
        challenge step