Skip to content

Commit 7e4dd31

Browse files
committed
add cipher_pref in builder doc
1 parent 30f3ab2 commit 7e4dd31

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

awsiot/mqtt5_client_builder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@
168168
169169
**ca_bytes** (`bytes`): Override default trust store with CA certificates from these PEM formatted bytes.
170170
171+
**cipher_pref** (:class:`awscrt.io.TlsCipherPref`): Cipher preference to use for TLS connection. Default is `TlsCipherPref.DEFAULT`.
172+
171173
**enable_metrics_collection** (`bool`): Whether to send the SDK version number in the CONNECT packet.
172174
Default is True.
173175

awsiot/mqtt_connection_builder.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@
111111
112112
**ca_bytes** (`bytes`): Override default trust store with CA certificates from these PEM formatted bytes.
113113
114+
**cipher_pref** (:class:`awscrt.io.TlsCipherPref`): Cipher preference to use for TLS connection. Default is `TlsCipherPref.DEFAULT`.
115+
114116
**enable_metrics_collection** (`bool`): Whether to send the SDK version number in the CONNECT packet.
115117
Default is True.
116118
@@ -557,6 +559,7 @@ def direct_with_custom_authorizer(
557559
use_websockets=False,
558560
**kwargs)
559561

562+
560563
def websockets_with_custom_authorizer(
561564
region=None,
562565
credentials_provider=None,
@@ -595,7 +598,7 @@ def websockets_with_custom_authorizer(
595598
auth_authorizer_signature (`str`): The digital signature of the token value in the `auth_token_value`
596599
parameter. The signature must be based on the private key associated with the custom authorizer. The
597600
signature must be base64 encoded.
598-
Required if the custom authorizer has signing enabled.
601+
Required if the custom authorizer has signing enabled.
599602
600603
auth_token_key_name (`str`): Key used to extract the custom authorizer token from MQTT username query-string
601604
properties.
@@ -621,15 +624,15 @@ def websockets_with_custom_authorizer(
621624

622625

623626
def _with_custom_authorizer(auth_username=None,
624-
auth_authorizer_name=None,
625-
auth_authorizer_signature=None,
626-
auth_password=None,
627-
auth_token_key_name=None,
628-
auth_token_value=None,
629-
use_websockets=False,
630-
websockets_credentials_provider=None,
631-
websockets_region=None,
632-
**kwargs) -> awscrt.mqtt.Connection:
627+
auth_authorizer_name=None,
628+
auth_authorizer_signature=None,
629+
auth_password=None,
630+
auth_token_key_name=None,
631+
auth_token_value=None,
632+
use_websockets=False,
633+
websockets_credentials_provider=None,
634+
websockets_region=None,
635+
**kwargs) -> awscrt.mqtt.Connection:
633636
"""
634637
Helper function that contains the setup needed for custom authorizers
635638
"""
@@ -662,7 +665,7 @@ def _with_custom_authorizer(auth_username=None,
662665
kwargs["password"] = auth_password
663666

664667
tls_ctx_options = awscrt.io.TlsContextOptions()
665-
if use_websockets == False:
668+
if not use_websockets:
666669
kwargs["port"] = 443
667670
tls_ctx_options.alpn_list = ["mqtt"]
668671

0 commit comments

Comments
 (0)