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
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.
565
+
With Node.js applications, 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
566
567
567
An example using `setMTLSCertificates` to setup MTLS for gateway is shown below
568
568
@@ -573,13 +573,27 @@ client.setGateway({host: 'mygateway.mydomain.myextension', protocol: 'https', po
If you have content of the private keys and cert information instead of the the filepaths , you can directly set this information using setMTLSContents
577
+
578
+
An example using `setMTLSContents` to setup MTLS for gateway is shown below
client.setMTLSContents(cert.pem, key, caChainCert) // cert.pem, key, caChainCert are contents of the respective keys here. If you have a passphrase encoded data, please decode it and then pass the information to this method.
585
+
```
586
+
587
+
576
588
Please do note, these are used for setting a new proxy agent for the gateway server configuration.
577
589
578
590
If you want a custom proxy agent with MTLS , you can still use setProxyAgent method on client instance and inject your own httpsAgent.
579
591
The responsibility of setting the agent options inside the custom proxy agent will be with the caller.
580
592
581
593
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
594
595
+
Note that with javascript's Browser applications, MTLS is to be managed and supported by the Browser itself (Chrome, Firefox, ...), using standard Certificates stores.
596
+
583
597
### Inject custom Http Client
584
598
585
599
By default the SDK will use axios as default http client.
0 commit comments