Skip to content

Commit

Permalink
Fix details sections
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Dec 4, 2023
1 parent 4bdb66a commit 4c65765
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions samples/mqtt/websocket_connect/README_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ For this sample, using Websockets will attempt to fetch the AWS credentials to a

<details>
<summary> (code snipet to replace similar section)</summary>
<pre>
```
<pre language="c++"> <code>
Utils::cmdData cmdData = Utils::parseSampleInputWebsocketConnect(argc, argv, &apiHandle);

// Create the MQTT builder and populate it with data from cmdData.
Expand All @@ -49,14 +48,14 @@ Aws::Crt::Auth::CredentialsProviderChainDefaultConfig defaultConfig;
provider = Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderChainDefault(defaultConfig);
if (!provider)
{
fprintf(stderr, "Failure to create credentials provider!\n");
exit(-1);
fprintf(stderr, "Failure to create credentials provider!\n");
exit(-1);
}
Aws::Iot::WebsocketConfig config(cmdData.input_signingRegion, provider);
clientConfigBuilder = Aws::Iot::MqttClientConnectionConfigBuilder(config);
if (cmdData.input_ca != "")
{
clientConfigBuilder.WithCertificateAuthority(cmdData.input_ca.c_str());
clientConfigBuilder.WithCertificateAuthority(cmdData.input_ca.c_str());
}
if (cmdData.input_proxyHost == "")
{
Expand All @@ -74,11 +73,12 @@ if (cmdData.input_port != 0)
clientConfigBuilder.WithPortOverride(static_cast<uint16_t>(cmdData.input_port));
}
clientConfigBuilder.WithEndpoint(cmdData.input_endpoint);
```
</code>
</pre>
</details>

## How to run

Options for custom auth
```
--proxy_host <str>
Expand Down
5 changes: 3 additions & 2 deletions samples/mqtt/websocket_connect/README_static_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For this sample, using Websockets will attempt to fetch the AWS credentials to a
<details>
<summary> (code snipet to replace similar section)</summary>
<pre>
```
<pre language="c++"> <code>
Utils::cmdData cmdData = Utils::parseSampleInputWebsocketConnect(argc, argv, &apiHandle);

Aws::Crt::Auth::CredentialsProviderChainDefaultConfig defaultConfig;
Expand All @@ -57,11 +57,12 @@ Aws::Iot::WebsocketConfig config(cmdData.input_signingRegion, provider);
Aws::Iot::MqttClient client;
auto clientConfigBuilder = Aws::Iot::MqttClientConnectionConfigBuilder(config);
clientConfigBuilder.WithEndpoint((cmdData.input_endpoint));
```
</code>
</pre>
</details>

## How to run

Options for custom auth
```
--access_key_id <str>
Expand Down
5 changes: 2 additions & 3 deletions samples/mqtt/websocket_connect/README_username_password.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ For this sample, using Websockets will attempt to fetch the AWS credentials to a

<details>
<summary> (code snipet to replace similar section)</summary>
<pre>
```
<pre language="c++"> <code>
Utils::cmdData cmdData = Utils::parseSampleInputCustomAuthorizerConnect(argc, argv, &apiHandle);

// Create the MQTT builder and populate it with data from cmdData.
Expand All @@ -55,7 +54,7 @@ clientConfigBuilder.WithCustomAuthorizer(
(cmdData.input_customAuthorizerName),
(cmdData.input_customAuthorizerSignature),
(cmdData.input_customAuthPassword));
```
</code>
</pre>
</details>

Expand Down

0 comments on commit 4c65765

Please sign in to comment.