From sgcWebSockets 4.4.3, Amazon AWS IoT MQTT component supports custom authentication, so from this version all MQTT protocols are supported.
The following table lists the protocols that the AWS IoT device endpoints support and the authentication methods and ports they use.
AWS IoT Core lets you define custom authorizers so that you can manage your own client authentication and authorization. This is useful when you need to use authentication mechanisms other than the ones that AWS IoT Core natively supports. For example, if you are migrating existing devices in the field to AWS IoT Core and these devices use a custom bearer token or MQTT user name and password to authenticate, you can migrate them to AWS IoT Core without having to provision new identities for them. You can use custom authentication with any of the communication protocols that AWS IoT Core supports.
Example: if you want to use MQTT username and password to authenticate
oIoT := TsgcIoTAmazon_MQTT_Client.Create(nil); oIoT.MQTTAuthentication.Enabled := True; oIoT.MQTTAuthentication.Username := 'user'; oIoT.MQTTAuthentication.Password := 'password'; oIoT.CustomAuthentication.Enabled := True; oIoT.CustomAuthentication.WebSockets := True; oIoT.CustomAuthentication.Parameters := '/mqtt'; oIoT.Active := True;
Example: if you want to send a bearer token
oIoT := TsgcIoTAmazon_MQTT_Client.Create(nil); oIoT.CustomAuthentication.Enabled := True; oIoT.CustomAuthentication.WebSockets := True; oIoT.CustomAuthentication.Parameters := '/mqtt'; oIoT.CustomAuthentication.Headers.Text := 'Authorization: Bearer AbCdEf123456'; oIoT.Active := True;
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.