awslabs / aws-crt-nodejs

NodeJS bindings for the AWS Common Runtime.
Apache License 2.0
38 stars 24 forks source link

Add token_key_name and token_value support to MQTT311 custom auth #447

Closed TwistedTwigleg closed 1 year ago

TwistedTwigleg commented 1 year ago

Description of changes:

The current MQTT311 custom auth implementation is missing the ability to set the custom authorizer token key name and token key value, making it impossible to login with a signed custom authorizer using the builder.

This PR adds the support for the custom auth token key name and token key value. The change is completely backwards compatible as the new values are optional.

(Though the V2 SDKs will need to be updated because at least the browser refers to the custom auth signature as the "password" which is incorrect...)


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

TwistedTwigleg commented 1 year ago

Sure, I'll add a test and will update C++ (and later Java) as well.

TwistedTwigleg commented 1 year ago

Thanks! Merging into main...