Interface EnhancedAuthenticatorProvider

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface EnhancedAuthenticatorProvider
    The authenticator provider allows to implement custom logic for the authentication of connecting MQTT clients. For each client an EnhancedAuthenticator can be provided that contains the authentication logic.
    Since:
    4.3.0, CE 2020.1
    • Method Detail

      • getEnhancedAuthenticator

        @Nullable EnhancedAuthenticator getEnhancedAuthenticator​(@NotNull AuthenticatorProviderInput authenticatorProviderInput)
        This method is called for each client by HiveMQ.

        Either the same EnhancedAuthenticator (stateless or must be thread-safe) or a new one (stateful, must not be thread-safe) can be supplied on each call.

        null can be returned if no authentication for the client is necessary.

        Returns:
        An implementation of EnhancedAuthenticator. null is ignored and has the same effect as if this provider would had not been set for the connecting client.
        Since:
        4.3.0, CE 2020.1