@@ -569,6 +569,8 @@ def direct_with_custom_authorizer(
569569 auth_authorizer_name = None ,
570570 auth_authorizer_signature = None ,
571571 auth_password = None ,
572+ auth_token_key_name = None ,
573+ auth_token_value = None ,
572574 ** kwargs ) -> awscrt .mqtt5 .Client :
573575 """
574576 This builder creates an :class:`awscrt.mqtt5.Client`, configured for an MQTT5 Client using a custom
@@ -581,17 +583,30 @@ def direct_with_custom_authorizer(
581583 auth_username (`str`): The username to use with the custom authorizer.
582584 If provided, the username given will be passed when connecting to the custom authorizer.
583585 If not provided, it will check to see if a username has already been set (via username="example")
584- and will use that instead.
585- If no username has been set then no username will be sent with the MQTT connection.
586-
587- auth_authorizer_name (`str`): The name of the custom authorizer.
588- If not provided, then "x-amz-customauthorizer-name" will not be added with the MQTT connection.
589-
590- auth_authorizer_signature (`str`): The signature of the custom authorizer.
591- If not provided, then "x-amz-customauthorizer-name" will not be added with the MQTT connection.
586+ and will use that instead. Custom authentication parameters will be appended as appropriate
587+ to any supplied username value.
592588
593589 auth_password (`str`): The password to use with the custom authorizer.
594- If not provided, then no passord will be set.
590+ If not provided, then no password will be sent in the initial CONNECT packet.
591+
592+ auth_authorizer_name (`str`): Name of the custom authorizer to use.
593+ Required if the endpoint does not have a default custom authorizer associated with it. It is strongly
594+ suggested to URL-encode this value; the SDK will not do so for you.
595+
596+ auth_authorizer_signature (`str`): The digital signature of the token value in the `auth_token_value`
597+ parameter. The signature must be based on the private key associated with the custom authorizer. The
598+ signature must be base64 encoded.
599+ Required if the custom authorizer has signing enabled. It is strongly suggested to URL-encode this value;
600+ the SDK will not do so for you.
601+
602+ auth_token_key_name (`str`): Key used to extract the custom authorizer token from MQTT username query-string
603+ properties.
604+ Required if the custom authorizer has signing enabled. It is strongly suggested to URL-encode
605+ this value; the SDK will not do so for you.
606+
607+ auth_token_value (`str`): An opaque token value. This value must be signed by the private key associated with
608+ the custom authorizer and the result passed in via the `auth_authorizer_signature` parameter.
609+ Required if the custom authorizer has signing enabled.
595610 """
596611
597612 _check_required_kwargs (** kwargs )
@@ -606,10 +621,14 @@ def direct_with_custom_authorizer(
606621 if auth_authorizer_name is not None :
607622 username_string = _add_to_username_parameter (
608623 username_string , auth_authorizer_name , "x-amz-customauthorizer-name=" )
624+
609625 if auth_authorizer_signature is not None :
610626 username_string = _add_to_username_parameter (
611627 username_string , auth_authorizer_signature , "x-amz-customauthorizer-signature=" )
612628
629+ if auth_token_key_name is not None and auth_token_value is not None :
630+ username_string = _add_to_username_parameter (username_string , auth_token_value , auth_token_key_name + "=" )
631+
613632 kwargs ["username" ] = username_string
614633 kwargs ["password" ] = auth_password
615634
@@ -628,6 +647,8 @@ def websockets_with_custom_authorizer(
628647 auth_authorizer_signature = None ,
629648 auth_password = None ,
630649 websocket_proxy_options = None ,
650+ auth_token_key_name = None ,
651+ auth_token_value = None ,
631652 ** kwargs ) -> awscrt .mqtt5 .Client :
632653 """
633654 This builder creates an :class:`awscrt.mqtt5.Client`, configured for an MQTT5 Client using a custom
@@ -640,17 +661,30 @@ def websockets_with_custom_authorizer(
640661 auth_username (`str`): The username to use with the custom authorizer.
641662 If provided, the username given will be passed when connecting to the custom authorizer.
642663 If not provided, it will check to see if a username has already been set (via username="example")
643- and will use that instead.
644- If no username has been set then no username will be sent with the MQTT connection.
664+ and will use that instead. Custom authentication parameters will be appended as appropriate
665+ to any supplied username value.
666+
667+ auth_password (`str`): The password to use with the custom authorizer.
668+ If not provided, then no password will be sent in the initial CONNECT packet.
645669
646- auth_authorizer_name (`str`): The name of the custom authorizer.
647- If not provided, then "x-amz-customauthorizer-name" will not be added with the MQTT connection.
670+ auth_authorizer_name (`str`): Name of the custom authorizer to use.
671+ Required if the endpoint does not have a default custom authorizer associated with it. It is strongly
672+ suggested to URL-encode this value; the SDK will not do so for you.
648673
649- auth_authorizer_signature (`str`): The signature of the custom authorizer.
650- If not provided, then "x-amz-customauthorizer-name" will not be added with the MQTT connection.
674+ auth_authorizer_signature (`str`): The digital signature of the token value in the `auth_token_value`
675+ parameter. The signature must be based on the private key associated with the custom authorizer. The
676+ signature must be base64 encoded.
677+ Required if the custom authorizer has signing enabled. It is strongly suggested to URL-encode this value;
678+ the SDK will not do so for you.
651679
652- auth_password (`str`): The password to use with the custom authorizer.
653- If not provided, then no passord will be set.
680+ auth_token_key_name (`str`): Key used to extract the custom authorizer token from MQTT username query-string
681+ properties.
682+ Required if the custom authorizer has signing enabled. It is strongly suggested to URL-encode
683+ this value; the SDK will not do so for you.
684+
685+ auth_token_value (`str`): An opaque token value. This value must be signed by the private key associated with
686+ the custom authorizer and the result passed in via the `auth_authorizer_signature` parameter.
687+ Required if the custom authorizer has signing enabled.
654688
655689 websocket_proxy_options (awscrt.http.HttpProxyOptions): Deprecated,
656690 for proxy settings use `http_proxy_options` (described in
@@ -669,10 +703,14 @@ def websockets_with_custom_authorizer(
669703 if auth_authorizer_name is not None :
670704 username_string = _add_to_username_parameter (
671705 username_string , auth_authorizer_name , "x-amz-customauthorizer-name=" )
706+
672707 if auth_authorizer_signature is not None :
673708 username_string = _add_to_username_parameter (
674709 username_string , auth_authorizer_signature , "x-amz-customauthorizer-signature=" )
675710
711+ if auth_token_key_name is not None and auth_token_value is not None :
712+ username_string = _add_to_username_parameter (username_string , auth_token_value , auth_token_key_name + "=" )
713+
676714 kwargs ["username" ] = username_string
677715 kwargs ["password" ] = auth_password
678716
0 commit comments