The following examples show a general case for implementing a custom authenticator extension and its related edge device client.
These simple examples are generic and are intended only for testing/understanding, and should never be used in a production environment.
Example Overview
In this example, the custom edge authenticator requires that edge clients attempting to authenticate should provide a secret token and a valid username. These keys are described below:
secretTokenKey — The name of the token key associated with the supplied set of security claims.
whoTheySaidTheyWere — The name of the user associated with the supplied set of security claims.
These credentials are used as security claims for the Edge device. The key-value pairs are added to the SecurityClaims by the edge client and these claims are then presented to the server when the edge device attempts to connect. The authenticator processes the claims as follows:
The existence of secretTokenKey is checked to determine whether or not the authenticator extension in the example is used to process the authentication request from the edge device.
The value of secretTokenKey is checked, and if valid, returns the value of whoTheySaidTheyWere to the platform.
If whoTheySaidTheyWere is a valid user on the ThingWorx platform, then the edge device can connect to the platform.
For more information on how the authenticator extension is implemented, see Edge Device Authenticator Extension Example.
For more information on how the adding security claims to the edge device, see Edge Device Security Claims Example.
Was this helpful?