You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -560,6 +560,55 @@ agent = new HttpsProxyAgent({
560
560
client.setProxyAgent(agent)
561
561
```
562
562
563
+
### Using MTLS authentication via a Gateway
564
+
565
+
If there is MTLS authentication that need to be set for a gateway server (i.e. if the Genesys Cloud requests must be sent through an intermediate API gateway or equivalent, with MTLS enabled), you can use setMTLSCertificates to set the httpsAgent.
566
+
567
+
An example using `setMTLSCertificates` to setup MTLS for gateway is shown below
Please do note, these are used for setting a new proxy agent for the gateway server configuration.
577
+
578
+
If you want a custom proxy agent with MTLS , you can still use setProxyAgent method on client instance and inject your own httpsAgent.
579
+
The responsibility of setting the agent options inside the custom proxy agent will be with the caller.
580
+
581
+
Use Either setMTLSCertificates, or setProxyAgent or setHttpClient based on your use case, as the properties will be overridden based on what is invoked last.
582
+
583
+
### Inject custom Http Client
584
+
585
+
By default the SDK will use axios as default http client.
586
+
If you want to inject a new third party/custom implementation of client , you set the httpclient instance
587
+
588
+
The CustomHttpClient should be an instance of AbstractHttpClient defined in the SDK. which will implement the request method.
589
+
Please find an example for the same.
590
+
591
+
```javascript
592
+
593
+
classCustomHttpClientextendsAbstractHttpClient{
594
+
595
+
constructor() {
596
+
super();
597
+
this._axiosInstance=axios.create({});
598
+
}
599
+
600
+
request(options) {
601
+
returnthis._axiosInstance.request(options);
602
+
}
603
+
}
604
+
605
+
606
+
constclient=platformClient.ApiClient.instance;
607
+
608
+
httpClient =newCustomHttpClient();
609
+
client.setHttpClient(httpClient)
610
+
```
611
+
563
612
## Versioning
564
613
565
614
The SDK's version is incremented according to the [Semantic Versioning Specification](https://semver.org/). The decision to increment version numbers is determined by [diffing the Platform API's swagger](https://github.com/purecloudlabs/platform-client-sdk-common/blob/master/modules/swaggerDiff.js) for automated builds, and optionally forcing a version bump when a build is triggered manually (e.g. releasing a bugfix).
@@ -560,6 +560,55 @@ agent = new HttpsProxyAgent({
560
560
client.setProxyAgent(agent)
561
561
```
562
562
563
+
### Using MTLS authentication via a Gateway
564
+
565
+
If there is MTLS authentication that need to be set for a gateway server (i.e. if the Genesys Cloud requests must be sent through an intermediate API gateway or equivalent, with MTLS enabled), you can use setMTLSCertificates to set the httpsAgent.
566
+
567
+
An example using `setMTLSCertificates` to setup MTLS for gateway is shown below
Please do note, these are used for setting a new proxy agent for the gateway server configuration.
577
+
578
+
If you want a custom proxy agent with MTLS , you can still use setProxyAgent method on client instance and inject your own httpsAgent.
579
+
The responsibility of setting the agent options inside the custom proxy agent will be with the caller.
580
+
581
+
Use Either setMTLSCertificates, or setProxyAgent or setHttpClient based on your use case, as the properties will be overridden based on what is invoked last.
582
+
583
+
### Inject custom Http Client
584
+
585
+
By default the SDK will use axios as default http client.
586
+
If you want to inject a new third party/custom implementation of client , you set the httpclient instance
587
+
588
+
The CustomHttpClient should be an instance of AbstractHttpClient defined in the SDK. which will implement the request method.
589
+
Please find an example for the same.
590
+
591
+
```javascript
592
+
593
+
classCustomHttpClientextendsAbstractHttpClient{
594
+
595
+
constructor() {
596
+
super();
597
+
this._axiosInstance=axios.create({});
598
+
}
599
+
600
+
request(options) {
601
+
returnthis._axiosInstance.request(options);
602
+
}
603
+
}
604
+
605
+
606
+
constclient=platformClient.ApiClient.instance;
607
+
608
+
httpClient =newCustomHttpClient();
609
+
client.setHttpClient(httpClient)
610
+
```
611
+
563
612
## Versioning
564
613
565
614
The SDK's version is incremented according to the [Semantic Versioning Specification](https://semver.org/). The decision to increment version numbers is determined by [diffing the Platform API's swagger](https://github.com/purecloudlabs/platform-client-sdk-common/blob/master/modules/swaggerDiff.js) for automated builds, and optionally forcing a version bump when a build is triggered manually (e.g. releasing a bugfix).
0 commit comments