You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds custom authorizer support and sample to the Python V2 SDK
Commit log:
* Added custom authorizer sample
* Fixed documentation generation error and fixed custom authorizer password not being set correctly in CI
* Added custom authorizer sample to README
* Code review changes: fixed naming and cleaned up code
@@ -324,6 +325,39 @@ To run this sample with a basic certificate from AWS IoT Core:
324
325
python3 windows_cert_connect.py --endpoint <endpoint> --ca_file <path to root CA> --cert <path to certificate>
325
326
```
326
327
328
+
## Custom Authorizer Connect
329
+
330
+
This sample makes an MQTT connection and connects through a [Custom Authorizer](https://docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html). On startup, the device connects to the server and then disconnects. This sample is for reference on connecting using a custom authorizer.
331
+
332
+
Your Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerguide/iot-policies.html) must provide privileges for this sample to connect.
You will need to setup your Custom Authorizer so that the lambda functionreturns a policy document. See [this page on the documentation](https://docs.aws.amazon.com/iot/latest/developerguide/config-custom-auth.html) for more details and example return result.
self.register_command(self.m_cmd_custom_auth_username, "<str>", "The name to send when connecting through the custom authorizer (optional)")
82
+
self.register_command(self.m_cmd_custom_auth_authorizer_name, "<str>", "The name of the custom authorizer to connect to (optional but required for everything but custom domains)")
83
+
self.register_command(self.m_cmd_custom_auth_username, "<str>", "The signature to send when connecting through a custom authorizer (optional)")
84
+
self.register_command(self.m_cmd_custom_auth_password, "<str>", "The password to send when connecting through a custom authorizer (optional)")
85
+
80
86
"""
81
87
Returns the command if it exists and has been passed to the console, otherwise it will print the help for the sample and exit the application.
0 commit comments