Security > Authenticators > Edge Device Authenticators > Example
  
Example
The following example is provided to show a general case of how a custom authenticator extension and its related edge device client can be implemented. These simple examples are generic and intended for testing/understanding only, 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 are expected to 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.
Developing the Authenticator Extension
For more information on how the authenticator extension is implemented, see Edge Device Authenticator Extension Example.
Adding Security Claims to the Edge Device
For more information on how the adding security claims to the edge device, see Edge Device Security Claims Example.