Interface AuthenticatorProvider
-
- 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 AuthenticatorProvider
The authenticator provider allows to implement custom logic for the authentication of connecting MQTT clients. For each client anAuthenticator
can be provided that contains the authentication logic.- Since:
- 4.0.0, CE 2019.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable Authenticator
getAuthenticator(@NotNull AuthenticatorProviderInput authenticatorProviderInput)
This method is called for each client by HiveMQ.
-
-
-
Method Detail
-
getAuthenticator
@Nullable Authenticator getAuthenticator(@NotNull AuthenticatorProviderInput authenticatorProviderInput)
This method is called for each client by HiveMQ.Either the same
Authenticator
(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.- Parameters:
authenticatorProviderInput
- TheAuthenticatorProviderInput
.- Returns:
- An implementation of
SimpleAuthenticator
.null
is ignored and has the same effect as if this provider would had not been set for the connecting client. Returning any other implementation of theAuthenticator
interface is an error. - Since:
- 4.0.0, CE 2019.1
-
-