Skip to content

cloudiot_mqtt_example.py create_jwt wrong token expiry time #3133

@somervda

Description

@somervda

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/iot/api-client/mqtt_example/cloudiot_mqtt_example.py

In the create_jwt function

The actual expiry token time of 60 minutes does not align with the comments for the code that say it is set to 20 minutes. Also does not align with the send_data_from_bound_device function in the same file that indicates jwt expiry should be using the jwt_expires_minutes parameter.

Suggested fix is to pass the jwt_expires_minutes parameter to create_jwt function to remove the inconsistencies.

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: cloudiotIssues related to the IoT Core API.priority: p2Moderately-important priority. Fix may not be included in next release.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions