To implement a custom user verifier, you need to complete the following steps.
We recommend that you use one of theexisting user verifier implementations as a reference.
A user verifier configuration schema is an Avro compatible schema that defines configuration parameters of the user verifier. The following parameters in the schema affect Kaa Admin UI layout.
Once you have prepared your schema, you can compile it using the following command.
java -jar /path/to/avro-tools-1.7.7.jar compile schema <schema file> <destination>
Please refer to Compiling the schema for more information. It is also possible to integrate the schema compilation with avro-maven-plugin.
All Kaa user verifiers extend generic abstract class org.kaaproject.kaa.server.common.verifier.AbstractUserVerifier<T>. The following code example illustrates the implementation of a custom user verifier.
A user verifier descriptor provides Kaa with the information on how to locate and configure your custom user verifier. To implement a user verifier descriptor, you need to implement the PluginConfig interface at first.
It is also important to provide your class with the @KaaPluginConfig annotiation. This annotation helps Kaa Admin UI to find all available user verifiers in the class path.
A user verifier descriptor is optional if you are going to configure your user verifiers using only REST API.
The following code example illustrates the implementation of a user verifier descriptor.
To provision your user verifier, do the following: