server.clientCertificates.get
(FintechOS Studio 20.2 and later)
Returns a registered TLS client certificate. For information on how to register client certificates, see the Innovation Core documentation.
Syntax
function server.clientCertificates.get(certificateName: string): WorkflowClientCertificate
| Parameter | Description |
|---|---|
certificateName
|
Name of the client certificate registered int the web.config configuration file. |
Return Value
Returns a JSON object containing the client certificate specifications. The object can be used as an optional parameter in httpGet and httpPost functions to run requests to web services that require TLS authentication.
Examples
In this example:
- We retreive the clientCert1 certificate (that has been registered in the web.config configuration file) in a variable called cert.
- We run an HTTP Post request to the https://server.com/route2 server with the myPostData payload using the certificate. For details on how to run HTTP Post requests, see httpPost.
- We store the request response in the postResult variable.
var cert = server.clientCertificates.get('clientCert1');
var postResult = httpPost('https://server.com/route2', myPostData, {clientCertificate: cert});