Azure IoT Hub - Generating the SAS Token connection string
IoT devices identify themselves by presenting credentials when they connect to an IoT hub. Unique credentials are burned into each IoT device. The simplest way to prototype IoT Hub connected devices is to use Shared Access Signature Tokens. SAS Tokens are created by signing configuration information with the device's symmetric key that was generated when the device was provisioned in the IoT hub. There are several different ways to manage device credentials on the device itself. Embed the Symmetric key in the device and have the device generate the token. This has the advantage of letting the device refresh its tokens. It has the disadvantage that the symmetric key has been installed on a device that you can lose control of. Embed the SAS Token directly in your device if the device does not have a library to generate them. This has the advantage of not needing the signing library. It has the disadvantage that you have hard-coded a future death date into the devic...