Interface AuthorizerProvider
- 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 AuthorizerProvider
The authorizer provider allows to implement custom logic for the authorization for specific actions (i.e subscribing,
publishing etc.) of MQTT clients. For each client an
Authorizer for the specific action can be provided that
contains the authorization logic.- Since:
- 4.0.0, CE 2019.1
-
Method Summary
Modifier and Type Method Description @Nullable AuthorizergetAuthorizer(@NotNull AuthorizerProviderInput authorizerProviderInput)This method is called for each client by HiveMQ.
-
Method Details
-
getAuthorizer
@Nullable @Nullable Authorizer getAuthorizer(@NotNull AuthorizerProviderInput authorizerProviderInput)This method is called for each client by HiveMQ.Either the same
Authorizer(stateless or must be thread-safe) or a new one (stateful, must not be thread-safe) can be supplied on each call.nullcan be returned if no authorization for the client is necessary.- Returns:
- Either an implementation of
SubscriptionAuthorizeror an implementation ofPublishAuthorizer.nullis ignored and has the same effect as if this provider would had not been set for the connecting client. Returning any other implementation of theAuthorizerinterface is an error. - Since:
- 4.0.0, CE 2019.1
-